Skip to content
Snippets Groups Projects
Commit 7cba4d65 authored by quentusrex's avatar quentusrex
Browse files

This is suppose to fix the bug where maildrop and maildirmake doesn't rebuild...

This is suppose to fix the bug where maildrop and maildirmake doesn't rebuild the /maildirsize file. 
parent 0d0cd9b8
No related merge requests found
......@@ -81,6 +81,7 @@ class mail_plugin {
exec('chown -R '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($data['new']['maildir']));
$app->log('Created Maildir: '.$data['new']['maildir'],LOGLEVEL_DEBUG);
}
}
function user_update($event_name,$data) {
......@@ -104,6 +105,9 @@ class mail_plugin {
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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment