diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 22f9c7838896c71d2c4435af07e5b447e646631a..dfd0842568b19d12b249c4befe590ffe67600cdd 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -391,6 +391,9 @@ class installer_base { } } + // preserve needed values in $conf (should just array_merge $tpl_ini_array into $conf?) + $conf['mail']['content_filter'] = $tpl_ini_array['mail']['content_filter']; + $server_ini_content = array_to_ini($tpl_ini_array); $mail_server_enabled = ($conf['services']['mail'])?1:0; @@ -1475,7 +1478,7 @@ class installer_base { } $new_options[] = $value; } - if ($configure_lmtp) { + if ($configure_lmtp && $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:${quoted_config_dir}/mysql-verify_recipients.cf")); diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php index 2d6f063cd855752aa730a5bda6c34961949a00e2..34a8509e4f0c90b48b4fa8af7517df6997050d71 100644 --- a/server/plugins-available/postfix_server_plugin.inc.php +++ b/server/plugins-available/postfix_server_plugin.inc.php @@ -326,7 +326,7 @@ class postfix_server_plugin { } $new_options[] = $value; } - if (defined($configure_lmtp) && $configure_lmtp) { + if (defined($configure_lmtp) && $configure_lmtp && $mail_config['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:${quoted_postfix_config_dir}/mysql-verify_recipients.cf"));