From 05beae43cfeb15ea89b984d36105dcdbdffd0975 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 18 Oct 2013 09:16:34 -0400
Subject: [PATCH] Resolved differences from svn merge to trunk and git master

---
 install/lib/installer_base.lib.php |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1e8459e..d77ab21 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -665,6 +665,15 @@
 		//* mysql-virtual_relayrecipientmaps.cf
 		$this->process_postfix_config('mysql-virtual_relayrecipientmaps.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');
+
 		//* Changing mode and group of the new created config files.
 		caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
 				__FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed');
@@ -1039,7 +1048,20 @@
 		// Add the clamav user to the amavis group
 		exec('adduser clamav amavis');
 
-
+		// Create the director for DKIM-Keys
+		mkdir("/var/lib/amavis/dkim",0750);
+		// get shell-user for amavis
+		$amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
+		if(!empty($amavis_user)) {
+			$amavis_user=rtrim($amavis_user,":");
+			exec('chown '.$amavis_user.'/var/lib/amavis/dkim');
+		}
+		// get shell-group for amavis
+		$amavis_group=exec('grep -o "^amavis:\|^vscan:" /etc/group');
+		if(!empty($amavis_group)) {
+			$amavis_group=rtrim($amavis_group,":");
+			exec('chgrp '.$amavis_group.'/var/lib/amavis/dkim');
+		}
 	}
 
 	public function configure_spamassassin() {
@@ -1691,6 +1713,7 @@
 		$content = str_replace('{language}', $conf['language'], $content);
 		$content = str_replace('{timezone}', $conf['timezone'], $content);
 		$content = str_replace('{theme}', $conf['theme'], $content);
+		$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
 
 		wf($install_dir.'/interface/lib/'.$configfile, $content);
 
@@ -1715,6 +1738,7 @@
 		$content = str_replace('{language}', $conf['language'], $content);
 		$content = str_replace('{timezone}', $conf['timezone'], $content);
 		$content = str_replace('{theme}', $conf['theme'], $content);
+		$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
 
 		wf($install_dir.'/server/lib/'.$configfile, $content);
 

--
Gitblit v1.9.1