diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 69691a6afd7c34f1ed1baa89ddd0f867e0653499..7b5210f01343b000da32eaeb5347c94d385051ba 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -427,15 +427,15 @@ class installer extends installer_base foreach ($options as $value) { $value = trim($value); if ($value == '') continue; - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; } - if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') { + if ($configure_lmtp && (!isset($conf['mail']['content_filter']) || $conf['mail']['content_filter'] === 'amavisd')) { for ($i = 0; isset($new_options[$i]); $i++) { if ($new_options[$i] == 'reject_unlisted_recipient') { - array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf")); + array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$config_dir}/mysql-verify_recipients.cf")); break; } } @@ -502,20 +502,26 @@ class installer extends installer_base // Check if we have a dhparams file and if not, create it if(!file_exists('/etc/dovecot/dh.pem')) { - swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.'); + // Create symlink to ISPConfig dhparam file + swriteln('Creating symlink /etc/dovecot/dh.pem to ISPConfig DHParam file.'); + symlink('/usr/local/ispconfig/interface/ssl/dhparam4096.pem', '/etc/dovecot/dh.pem'); + + /* + swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.'); if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) { // convert existing ssl parameters file $command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } else { - /* - Create a new dhparams file. We use 2048 bit only as it simply takes too long - on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need - a 4096 bit file, create it manually before you install ISPConfig - */ + + //Create a new dhparams file. We use 2048 bit only as it simply takes too long + //on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need + // a 4096 bit file, create it manually before you install ISPConfig + $command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } + */ } //remove #2.3+ comment $content = file_get_contents($config_dir.'/'.$configfile);