From 738c3d47f74d8a117175452aac2cd662b0e3b95b Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Mon, 10 Feb 2014 09:14:49 -0500
Subject: [PATCH] Merge remote-tracking branch 'origin/stable-3.0.5'
---
install/dist/lib/gentoo.lib.php | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index a47f0d0..3ee3939 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -157,6 +157,19 @@
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
+ //* 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');
+
//* Chmod and chown the .mailfilter file
$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -232,7 +245,7 @@
//* Reconfigure postfix to use dovecot authentication
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
- 'virtual_transport = dovecot',
+ 'virtual_transport = lmtp:unix:private/dovecot-lmtp',
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth'
);
@@ -319,14 +332,25 @@
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
- //* Append the configuration for amavisd to the master.cf file
+ // Append the configuration for amavisd to the master.cf file
$content = rf($conf['postfix']['config_dir'].'/master.cf');
-
- if(!stristr($content, '127.0.0.1:10025')) //* Only add the content if we had not addded it before
- {
+ // Only add the content if we had not addded it before
+ if(!preg_match('/^amavis\s+unix\s+/m', $content)) {
unset($content);
$content = $this->get_template_file('master_cf_amavis', true);
af($conf['postfix']['config_dir'].'/master.cf', $content);
+ $content = rf($conf['postfix']['config_dir'].'/master.cf');
+ }
+ if(!preg_match('/^127.0.0.1:10025\s+/m', $content)) {
+ unset($content);
+ $content = $this->get_template_file('master_cf_amavis10025', true);
+ af($conf['postfix']['config_dir'].'/master.cf', $content);
+ $content = rf($conf['postfix']['config_dir'].'/master.cf');
+ }
+ if(!preg_match('/^127.0.0.1:10027\s+/m', $content)) {
+ unset($content);
+ $content = $this->get_template_file('master_cf_amavis10027', true);
+ af($conf['postfix']['config_dir'].'/master.cf', $content);
}
unset($content);
--
Gitblit v1.9.1