From 2e1086d1d59a433cc5ffab06b1b30c6c39163ab9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 11 Aug 2007 16:22:29 -0400
Subject: [PATCH] mailsize file for accounting of incoming mails

---
 install/tpl/mailfilter.master      |    3 +++
 install/lib/installer_base.lib.php |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 3c1933a..f17b9f2 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -615,6 +615,10 @@
 		$command = "chown -R ispconfig:ispconfig ".$conf["ispconfig_install_dir"];
 		caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
 		
+		// make sure that the server config file (not the interface one) is only readable by the root user
+		exec('chmod 600 '.$conf["ispconfig_install_dir"].'/server/lib/'.$configfile);
+		exec('chown root:root '.$conf["ispconfig_install_dir"].'/server/lib/'.$configfile);
+		
 		// TODO: FIXME: add the www-data user to the ispconfig group. This is just for testing
 		// and must be fixed as this will allow the apache user to read the ispconfig files.
 		// Later this must run as own apache server or via suexec!
diff --git a/install/tpl/mailfilter.master b/install/tpl/mailfilter.master
index e95908a..32a3eca 100644
--- a/install/tpl/mailfilter.master
+++ b/install/tpl/mailfilter.master
@@ -45,6 +45,9 @@
   include "{dist_postfix_vmail_mailbox_base}/mailfilters/$HOST/$USER/.autoresponder"
 }
 
+# Create a mailsize file
+`echo $SIZE >> {dist_postfix_vmail_mailbox_base}/$HOST/$USER/.ispconfig_mailsize`
+
 
 #
 # Check that user has his own maildrop include,

--
Gitblit v1.9.1