Skip to content

Commit bd1b59a

Browse files
author
Florian Schaal
committed
support conf-custom for tag_as-files for postfix/amavis
1 parent 4ffd1b1 commit bd1b59a

File tree

6 files changed

+43
-37
lines changed

6 files changed

+43
-37
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ function configure_postfix($options = '')
103103
$this->process_postfix_config('mysql-virtual_uids.cf');
104104

105105
//* postfix-dkim
106-
$full_file_name=$config_dir.'/tag_as_originating.re';
107-
if(is_file($full_file_name)) {
108-
copy($full_file_name, $config_dir.$configfile.'~');
109-
}
110-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
111-
112-
$full_file_name=$config_dir.'/tag_as_foreign.re';
113-
if(is_file($full_file_name)) {
114-
copy($full_file_name, $config_dir.$configfile.'~');
115-
}
116-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
106+
$filename='tag_as_originating.re';
107+
$full_file_name=$config_dir.'/'.$filename;
108+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
109+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
110+
wf($full_file_name, $content);
111+
112+
$filename='tag_as_foreign.re';
113+
$full_file_name=$config_dir.'/'.$filename;
114+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
115+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
116+
wf($full_file_name, $content);
117117

118118
//* Changing mode and group of the new created config files.
119119
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',

install/dist/lib/gentoo.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,17 @@ public function configure_postfix($options = '')
212212
}
213213

214214
//* postfix-dkim
215-
$full_file_name=$config_dir.'/tag_as_originating.re';
216-
if(is_file($full_file_name)) {
217-
copy($full_file_name, $config_dir.$configfile.'~');
218-
}
219-
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
220-
221-
$full_file_name=$config_dir.'/tag_as_foreign.re';
222-
if(is_file($full_file_name)) {
223-
copy($full_file_name, $config_dir.$configfile.'~');
224-
}
225-
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
215+
$filename='tag_as_originating.re';
216+
$full_file_name=$config_dir.'/'.$filename;
217+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
218+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
219+
wf($full_file_name, $content);
220+
221+
$filename='tag_as_foreign.re';
222+
$full_file_name=$config_dir.'/'.$filename;
223+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
224+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
225+
wf($full_file_name, $content);
226226

227227
//* Chmod and chown the .mailfilter file
228228
$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';

install/dist/lib/opensuse.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ function configure_postfix($options = '')
100100
$this->process_postfix_config('mysql-virtual_uids.cf');
101101

102102
//* postfix-dkim
103-
$full_file_name=$config_dir.'/tag_as_originating.re';
104-
if(is_file($full_file_name)) {
105-
copy($full_file_name, $config_dir.$configfile.'~');
106-
}
107-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
108-
109-
$full_file_name=$config_dir.'/tag_as_foreign.re';
110-
if(is_file($full_file_name)) {
111-
copy($full_file_name, $config_dir.$configfile.'~');
112-
}
113-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
103+
$filename='tag_as_originating.re';
104+
$full_file_name=$config_dir.'/'.$filename;
105+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
106+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
107+
wf($full_file_name, $content);
108+
109+
$filename='tag_as_foreign.re';
110+
$full_file_name=$config_dir.'/'.$filename;
111+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
112+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
113+
wf($full_file_name, $content);
114114

115115
//* Changing mode and group of the new created config files.
116116
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',

install/lib/installer_base.lib.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,13 +901,17 @@ public function configure_postfix($options = '') {
901901
$this->process_postfix_config('mysql-virtual_uids.cf');
902902

903903
//* postfix-dkim
904-
$full_file_name=$config_dir.'/tag_as_originating.re';
904+
$filename='tag_as_originating.re';
905+
$full_file_name=$config_dir.'/'.$filename;
905906
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
906-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
907+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
908+
wf($full_file_name, $content);
907909

908-
$full_file_name=$config_dir.'/tag_as_foreign.re';
910+
$filename='tag_as_foreign.re';
911+
$full_file_name=$config_dir.'/'.$filename;
909912
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
910-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
913+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
914+
wf($full_file_name, $content);
911915

912916
//* Changing mode and group of the new created config files.
913917
caselog('chmod u=rw,g=r,o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/^/ FILTER amavis:[127.0.0.1]:10024
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/^/ FILTER amavis:[127.0.0.1]:10026

0 commit comments

Comments
 (0)