diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 9537282f8ac29c7d04fdfa8635fc58fb64797ae1..f1c8d672042ac415e92b295dfac6a988bcc81a9d 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -103,17 +103,17 @@ class installer_dist extends installer_base { $this->process_postfix_config('mysql-virtual_uids.cf'); //* postfix-dkim - $full_file_name=$config_dir.'/tag_as_originating.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026'); - - $full_file_name=$config_dir.'/tag_as_foreign.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024'); + $filename='tag_as_originating.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); + + $filename='tag_as_foreign.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); //* Changing mode and group of the new created config files. caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 7fdec46d8542bc4feed9fc36d4ece3cc81339c3f..b3cfc207194f18f4dbddc039942fb06ddeb411af 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -212,17 +212,17 @@ class installer extends installer_base } //* postfix-dkim - $full_file_name=$config_dir.'/tag_as_originating.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - $this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026'); - - $full_file_name=$config_dir.'/tag_as_foreign.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - $this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024'); + $filename='tag_as_originating.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); + + $filename='tag_as_foreign.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); //* Chmod and chown the .mailfilter file $command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter'; diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index b9153a021c44b250afe0cb0df719ac478bc85d36..f991c77d2be66295c1a3756c543e174114f39f5c 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -100,17 +100,17 @@ class installer_dist extends installer_base { $this->process_postfix_config('mysql-virtual_uids.cf'); //* postfix-dkim - $full_file_name=$config_dir.'/tag_as_originating.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026'); - - $full_file_name=$config_dir.'/tag_as_foreign.re'; - if(is_file($full_file_name)) { - copy($full_file_name, $config_dir.$configfile.'~'); - } - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024'); + $filename='tag_as_originating.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); + + $filename='tag_as_foreign.re'; + $full_file_name=$config_dir.'/'.$filename; + if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); //* Changing mode and group of the new created config files. caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index d242fe753f4a58ab05f3cfc8e0a8bb12701a8b35..eb078a1e6efb4ce079f6836128209f25fab9f860 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -901,13 +901,17 @@ class installer_base { $this->process_postfix_config('mysql-virtual_uids.cf'); //* postfix-dkim - $full_file_name=$config_dir.'/tag_as_originating.re'; + $filename='tag_as_originating.re'; + $full_file_name=$config_dir.'/'.$filename; if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); - $full_file_name=$config_dir.'/tag_as_foreign.re'; + $filename='tag_as_foreign.re'; + $full_file_name=$config_dir.'/'.$filename; if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~'); - wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024'); + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master'); + wf($full_file_name, $content); //* Changing mode and group of the new created config files. caselog('chmod u=rw,g=r,o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', diff --git a/install/tpl/postfix-tag_as_foreign.re.master b/install/tpl/postfix-tag_as_foreign.re.master new file mode 100644 index 0000000000000000000000000000000000000000..a5920256d53d88649e5804bdbb292b6891f44f4a --- /dev/null +++ b/install/tpl/postfix-tag_as_foreign.re.master @@ -0,0 +1 @@ +/^/ FILTER amavis:[127.0.0.1]:10024 diff --git a/install/tpl/postfix-tag_as_originating.re.master b/install/tpl/postfix-tag_as_originating.re.master new file mode 100644 index 0000000000000000000000000000000000000000..a16fc0c644c8bbd412af1dc6e69ec29c66475aef --- /dev/null +++ b/install/tpl/postfix-tag_as_originating.re.master @@ -0,0 +1 @@ +/^/ FILTER amavis:[127.0.0.1]:10026