From 51ba4a3d2f6282a2ff106a4de57a36bedce1522f Mon Sep 17 00:00:00 2001
From: fantu <fantu@ispconfig3>
Date: Sat, 22 Nov 2008 17:35:33 -0500
Subject: [PATCH] FS#323 - Fix parse error in mailfilter

---
 server/plugins-available/mail_plugin.inc.php |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index c80deb1..c0a29ad 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/server/plugins-available/mail_plugin.inc.php
@@ -81,6 +81,10 @@
 			exec('chown -R '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($data['new']['maildir']));
 			$app->log('Created Maildir: '.$data['new']['maildir'],LOGLEVEL_DEBUG);
 		}
+		//This is to fix the maildrop quota not being rebuilt after the quota is changed.
+		exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name']);
+		$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG);
+		
 	}
 	
 	function user_update($event_name,$data) {
@@ -104,6 +108,9 @@
 			rmdir($data['old']['maildir']);
 			$app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'],LOGLEVEL_DEBUG);
 		}
+		//This is to fix the maildrop quota not being rebuilt after the quota is changed.
+		exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name']);
+		$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG);
 	}
 	
 	function user_delete($event_name,$data) {

--
Gitblit v1.9.1