| | |
| | | 'smtpd_tls_key_file = '.$config_dir.'/smtpd.key', |
| | | 'transport_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf', |
| | | 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf', |
| | | 'relay_recipient_maps = mysql:'.$config_dir.'/mysql-virtual_relayrecipientmaps.cf', |
| | | 'virtual_create_maildirsize = yes', |
| | | 'virtual_maildir_extended = yes', |
| | | 'virtual_mailbox_limit_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailbox_limit_maps.cf', |
| | | 'virtual_mailbox_limit_override = yes', |
| | | 'virtual_maildir_limit_message = "The user you are trying to reach is over quota."', |
| | | 'virtual_overquota_bounce = yes', |
| | | 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps', |
| | | 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf', |
| | | 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf', |
| | |
| | | } |
| | | } |
| | | |
| | | public function configure_bind() { |
| | | global $conf; |
| | | |
| | | //* Check if the zonefile directory has a slash at the end |
| | | $content=$conf['bind']['bind_zonefiles_dir']; |
| | | if(substr($content,-1,1) != '/') { |
| | | $content .= '/'; |
| | | } |
| | | |
| | | //* New default format of named.conf uses views. Check which version the system is using and include our zones file. |
| | | $named_conf = rf($conf['bind']['named_conf_path']); |
| | | if (stripos($named_conf, 'include "'.$conf['bind']['named_conf_local_path'].'";') === false) |
| | | { |
| | | preg_match_all("/(?<=\n)view \"(?:public|internal)\" in \{.*\n\};/Us", $named_conf, $views); |
| | | if (count($views[0]) == 2) { |
| | | foreach ($views[0] as $view) { |
| | | $named_conf = str_replace($view, substr($view, 0, -2)."include \"{$conf['bind']['named_conf_local_path']}\";\n};", $named_conf); |
| | | } |
| | | |
| | | wf($conf['bind']['named_conf_path'], $named_conf); |
| | | } |
| | | else { |
| | | af($conf['bind']['named_conf_path'], 'include "'.$conf['bind']['named_conf_local_path'].'";'); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public function configure_apache() |
| | | { |
| | | global $conf; |
| | |
| | | |
| | | $this->write_config_file("$install_dir/interface/lib/$configfile", $content); |
| | | |
| | | if(!$conf['CA-enabled']) $content = str_replace('$conf[\'CA','//$conf[\'CA', $content); |
| | | $content = str_replace('{CA-path}', $conf['CA-path'], $content); |
| | | $content = str_replace('{CA-pass}', $conf['CA-pass'], $content); |
| | | |
| | | //* Create the config file for ISPConfig server |
| | | $this->write_config_file("$install_dir/server/lib/$configfile", $content); |
| | | |
| | | //* Create the config file for remote-actions (but only, if it does not exist, because |
| | | //* the value is a autoinc-value and so changed by the remoteaction_core_module |
| | | //* Create the config file for remote-actions (but only, if it does not exist, because |
| | | // the value is a autoinc-value and so changed by the remoteaction_core_module |
| | | if (!file_exists($install_dir.'/server/lib/remote_action.inc.php')) { |
| | | $content = '<?php' . "\n" . '$maxid_remote_action = 0;' . "\n" . '?>'; |
| | | $this->write_config_file("$install_dir/server/lib/remote_action.inc.php", $content); |
| | | wf($install_dir.'/server/lib/remote_action.inc.php', $content); |
| | | } |
| | | |
| | | //* Enable the server modules and plugins. |
| | | // Enable the server modules and plugins. |
| | | // TODO: Implement a selector which modules and plugins shall be enabled. |
| | | $dir = $install_dir.'/server/mods-available/'; |
| | | if (is_dir($dir)) { |