Skip to content

Commit 9b4702d

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
Master
2 parents f163408 + 58023ff commit 9b4702d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

server/lib/classes/cron.d/100-monitor_email_quota.inc.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,20 @@ public function onRunJob() {
7777

7878
$mailboxes = $app->db->queryAllRecords("SELECT email,maildir FROM mail_user WHERE server_id = $server_id");
7979
if(is_array($mailboxes)) {
80+
81+
//* with dovecot we can use doveadm instead of 'du -s'
82+
$dovecot = false;
83+
if (isset($mail_config['pop3_imap_daemon']) && $mail_config ['pop3_imap_daemon'] = 'dovecot' && is_executable('doveadm')) {
84+
$dovecot = true;
85+
}
86+
8087
foreach($mailboxes as $mb) {
8188
$email = $mb['email'];
8289
$email_parts = explode('@', $mb['email']);
8390
$filename = $mb['maildir'].'/.quotausage';
91+
if(!file_exists($filename) && $dovecot) {
92+
exec('doveadm quota recalc -u '.$email);
93+
}
8494
if(file_exists($filename) && !is_link($filename)) {
8595
$quotafile = file($filename);
8696
preg_match('/storage.*?([0-9]+)/s', implode('',$quotafile), $storage_value);

server/plugins-available/mail_plugin_dkim.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function check_system($data) {
132132
}
133133

134134
} else {
135-
$app->log('Unable to write DKIM settings; Check your config!', LOGLEVEL_ERROR);
135+
$app->log('Unable to write DKIM settings - no DKIM-Path defined', LOGLEVEL_ERROR);
136136
$check=false;
137137
}
138138
return $check;

0 commit comments

Comments
 (0)