Skip to content

Commit a4ae330

Browse files
committed
handle doveadm quota output from different versions
1 parent 0f80900 commit a4ae330

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ public function onRunJob() {
8585
if ($retval = 64) {
8686
foreach ($res as $v) {
8787
$s = preg_split('/\s+/', $v);
88-
if ($s[2] == 'STORAGE') $dovecotQuotaUsage[$s[0]] = $s[3] * 1024; // doveadm output is in kB
88+
if ($s[2] == 'STORAGE') {
89+
$dovecotQuotaUsage[$s[0]] = $s[3] * 1024; // doveadm output is in kB
90+
} elseif ($s[3] == 'STORAGE') {
91+
$dovecotQuotaUsage[$s[0]] = $s[4] * 1024; // doveadm output is in kB
92+
}
8993
}
9094
}
9195
}

0 commit comments

Comments
 (0)