Skip to content

Commit 7cba4d6

Browse files
author
quentusrex
committed
This is suppose to fix the bug where maildrop and maildirmake doesn't rebuild the /maildirsize file.
1 parent 0d0cd9b commit 7cba4d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/plugins-available/mail_plugin.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function user_insert($event_name,$data) {
8181
exec('chown -R '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($data['new']['maildir']));
8282
$app->log('Created Maildir: '.$data['new']['maildir'],LOGLEVEL_DEBUG);
8383
}
84+
8485
}
8586

8687
function user_update($event_name,$data) {
@@ -104,6 +105,9 @@ function user_update($event_name,$data) {
104105
rmdir($data['old']['maildir']);
105106
$app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'],LOGLEVEL_DEBUG);
106107
}
108+
//This is to fix the maildrop quota not being rebuilt after the quota is changed.
109+
exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name']);
110+
$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG);
107111
}
108112

109113
function user_delete($event_name,$data) {

0 commit comments

Comments
 (0)