Commit 5e10d2d2 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: S#3317 - Mail quota display shows weird values on some systems

parent 40e6e695
......@@ -250,7 +250,9 @@ class monitor_tools {
$filename = $mb['maildir'].'/.quotausage';
if(file_exists($filename) && !is_link($filename)) {
$quotafile = file($filename);
$data[$email]['used'] = trim($quotafile['1']);
preg_match('/storage.*?([0-9]+)/s', implode('',$quotafile), $storage_value);
$data[$email]['used'] = $storage_value[1];
$app->log("Mail storage $email: " . $storage_value[1], LOGLEVEL_DEBUG);
unset($quotafile);
} else {
exec('du -s '.escapeshellcmd($mb['maildir']), $out);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment