Commit bd1b59a3 authored by Florian Schaal's avatar Florian Schaal

support conf-custom for tag_as-files for postfix/amavis

parent 4ffd1b13
...@@ -103,17 +103,17 @@ class installer_dist extends installer_base { ...@@ -103,17 +103,17 @@ class installer_dist extends installer_base {
$this->process_postfix_config('mysql-virtual_uids.cf'); $this->process_postfix_config('mysql-virtual_uids.cf');
//* postfix-dkim //* postfix-dkim
$full_file_name=$config_dir.'/tag_as_originating.re'; $filename='tag_as_originating.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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, '/^/ FILTER amavis:[127.0.0.1]:10026'); wf($full_file_name, $content);
$full_file_name=$config_dir.'/tag_as_foreign.re'; $filename='tag_as_foreign.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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, '/^/ FILTER amavis:[127.0.0.1]:10024'); wf($full_file_name, $content);
//* Changing mode and group of the new created config files. //* Changing mode and group of the new created config files.
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
......
...@@ -212,17 +212,17 @@ class installer extends installer_base ...@@ -212,17 +212,17 @@ class installer extends installer_base
} }
//* postfix-dkim //* postfix-dkim
$full_file_name=$config_dir.'/tag_as_originating.re'; $filename='tag_as_originating.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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');
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026'); wf($full_file_name, $content);
$full_file_name=$config_dir.'/tag_as_foreign.re'; $filename='tag_as_foreign.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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');
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024'); wf($full_file_name, $content);
//* Chmod and chown the .mailfilter file //* Chmod and chown the .mailfilter file
$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter'; $command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
......
...@@ -100,17 +100,17 @@ class installer_dist extends installer_base { ...@@ -100,17 +100,17 @@ class installer_dist extends installer_base {
$this->process_postfix_config('mysql-virtual_uids.cf'); $this->process_postfix_config('mysql-virtual_uids.cf');
//* postfix-dkim //* postfix-dkim
$full_file_name=$config_dir.'/tag_as_originating.re'; $filename='tag_as_originating.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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, '/^/ FILTER amavis:[127.0.0.1]:10026'); wf($full_file_name, $content);
$full_file_name=$config_dir.'/tag_as_foreign.re'; $filename='tag_as_foreign.re';
if(is_file($full_file_name)) { $full_file_name=$config_dir.'/'.$filename;
copy($full_file_name, $config_dir.$configfile.'~'); 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, '/^/ FILTER amavis:[127.0.0.1]:10024'); wf($full_file_name, $content);
//* Changing mode and group of the new created config files. //* Changing mode and group of the new created config files.
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
......
...@@ -901,13 +901,17 @@ class installer_base { ...@@ -901,13 +901,17 @@ class installer_base {
$this->process_postfix_config('mysql-virtual_uids.cf'); $this->process_postfix_config('mysql-virtual_uids.cf');
//* postfix-dkim //* 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.'~'); 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.'~'); 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. //* Changing mode and group of the new created config files.
caselog('chmod u=rw,g=r,o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', caselog('chmod u=rw,g=r,o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
......
/^/ FILTER amavis:[127.0.0.1]:10024
/^/ FILTER amavis:[127.0.0.1]:10026
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment