Skip to content

Commit 0b9a788

Browse files
author
quentusrex
committed
The mail box quota wasn't being run on mailbox creation. I had previously only fixed it when the mailbox is changed.
They both work fine now.
1 parent bac6ef6 commit 0b9a788

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/plugins-available/mail_plugin.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ 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+
//This is to fix the maildrop quota not being rebuilt after the quota is changed.
85+
exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name']);
86+
$app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG);
8487

8588
}
8689

0 commit comments

Comments
 (0)