Skip to content

Commit 72fbc87

Browse files
committed
enable_original_recipient = no for postfix > 3.2
1 parent 1c7afd4 commit 72fbc87

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,12 @@ public function configure_postfix($options = '') {
11371137
$content = strtr($content, $postconf_placeholders);
11381138
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
11391139
}
1140+
if(version_compare($postfix_version , '3.3', '>=')) {
1141+
$configfile = 'postfix_3-3.conf';
1142+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
1143+
$content = strtr($content, $postconf_placeholders);
1144+
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
1145+
}
11401146

11411147
//* These postconf commands will be executed on installation only
11421148
if($this->is_update == false) {
@@ -1453,7 +1459,6 @@ public function configure_dovecot() {
14531459
$postconf_commands[] = "enable_original_recipient = yes";
14541460
}
14551461
}
1456-
#exec("postconf -e 'smtpd_recipient_restrictions = ".implode(", ", $new_options)."'");
14571462
$postconf_commands[] = "smtpd_recipient_restrictions = ".implode(", ", $new_options);
14581463

14591464
// Executing the postconf commands
@@ -1675,7 +1680,7 @@ public function configure_amavis() {
16751680

16761681
public function configure_rspamd() {
16771682
global $conf;
1678-
1683+
16791684
//* These postconf commands will be executed on installation and update
16801685
$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
16811686
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Postfix configuration for version 3.3 and up
2+
3+
# 3.2 and earlier should not have this set when using reject_unverified_recipient
4+
enable_original_recipient = no

0 commit comments

Comments
 (0)