diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 3b0d6cd4e3361af8f941041da80649a3142937ef..d49c51f67188ec5bc3dfb5fdd3bb5dd0799c4daf 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -83,10 +83,8 @@ class installer_dist extends installer_base { $command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m'; if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + //* These postconf commands will be executed on installation and update $postconf_commands = array ( - 'myhostname = '.$conf['hostname'], - 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', - 'mynetworks = 127.0.0.0/8 [::1]/128', 'virtual_alias_domains =', 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf', 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf', @@ -118,6 +116,15 @@ class installer_dist extends installer_base { 'inet_interfaces = all' ); + //* These postconf commands will be executed on installation only + if($this->is_update == false) { + $postconf_commands = array_merge($postconf_commands,array( + 'myhostname = '.$conf['hostname'], + 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', + 'mynetworks = 127.0.0.0/8 [::1]/128' + )); + } + //* Create the header and body check files touch($config_dir.'/header_checks'); touch($config_dir.'/mime_header_checks'); diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 5b9d5bf08a73d0bb3b68fd7805d50cc46c8131cc..6fa2f554fb3879b1827e8977f75217f2778516c6 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -80,10 +80,8 @@ class installer extends installer_base caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } + //* These postconf commands will be executed on installation and update $postconf_commands = array ( - 'myhostname = '.$conf['hostname'], - 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', - 'mynetworks = 127.0.0.0/8 [::1]/128', 'virtual_alias_domains =', 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf', 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf', @@ -113,6 +111,15 @@ class installer extends installer_base 'body_checks = regexp:'.$config_dir.'/body_checks' ); + //* These postconf commands will be executed on installation only + if($this->is_update == false) { + $postconf_commands = array_merge($postconf_commands,array( + 'myhostname = '.$conf['hostname'], + 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', + 'mynetworks = 127.0.0.0/8 [::1]/128' + )); + } + //* Create the header and body check files touch($config_dir.'/header_checks'); touch($config_dir.'/mime_header_checks'); diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index c1d0ce5aa6c7943cd922476da5197b9c64f2e33f..5737b243876c8111cdfdf6d02b1b80d795ab7e8c 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -96,11 +96,9 @@ class installer_dist extends installer_base { } if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']); - + + //* These postconf commands will be executed on installation and update $postconf_commands = array ( - 'myhostname = '.$conf['hostname'], - 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', - 'mynetworks = 127.0.0.0/8 [::1]/128', 'virtual_alias_domains =', 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf', 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf', @@ -132,6 +130,15 @@ class installer_dist extends installer_base { 'inet_interfaces = all' ); + //* These postconf commands will be executed on installation only + if($this->is_update == false) { + $postconf_commands = array_merge($postconf_commands,array( + 'myhostname = '.$conf['hostname'], + 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', + 'mynetworks = 127.0.0.0/8 [::1]/128' + )); + } + //* Create the header and body check files touch($config_dir.'/header_checks'); touch($config_dir.'/mime_header_checks'); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0cc24d10dcda831f0a35b479f65b2b5af7b023d8..e65a08cb3293ddc043697fdcd7bee498acbec626 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -628,11 +628,9 @@ class installer_base { $command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m'; if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - + + //* These postconf commands will be executed on installation and update $postconf_commands = array ( - 'myhostname = '.$conf['hostname'], - 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', - 'mynetworks = 127.0.0.0/8 [::1]/128', 'alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases', 'alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases', 'virtual_alias_domains =', @@ -666,6 +664,15 @@ class installer_base { 'body_checks = regexp:'.$config_dir.'/body_checks', 'owner_request_special = no' ); + + //* These postconf commands will be executed on installation only + if($this->is_update == false) { + $postconf_commands = array_merge($postconf_commands,array( + 'myhostname = '.$conf['hostname'], + 'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain', + 'mynetworks = 127.0.0.0/8 [::1]/128' + )); + } //* Create the header and body check files touch($config_dir.'/header_checks');