From 718a313673986787552be8bbec92b5d3ffb5e408 Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Wed, 26 Feb 2014 08:44:23 +0100 Subject: [PATCH] Added new (debian) way for dovecot - IMAP - traffic-report, thx devil65 Signed-off-by: Florian Aders (EleRas) --- lib/classes/mail/class.mailLogParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/mail/class.mailLogParser.php b/lib/classes/mail/class.mailLogParser.php index d9930bd2..007c398c 100644 --- a/lib/classes/mail/class.mailLogParser.php +++ b/lib/classes/mail/class.mailLogParser.php @@ -189,7 +189,7 @@ class MailLogParser { $timestamp = $this->_getLogTimestamp($line); if ($this->startTime < $timestamp) { - if (preg_match("/dovecot.*(?::|\]) imap\(.*@([a-z0-9\.\-]+)\):.*in=(\d+) out=(\d+)/i", $line, $matches)) { + if (preg_match("/dovecot.*(?::|\]) imap\(.*@([a-z0-9\.\-]+)\):.*(?:in=(\d+) out=(\d+)|bytes=(\d+)\/(\d+))/i", $line, $matches)) { // Dovecot IMAP $this->_addDomainTraffic($matches[1], (int)$matches[2] + (int)$matches[3], $timestamp); } elseif (preg_match("/dovecot.*(?::|\]) pop3\(.*@([a-z0-9\.\-]+)\):.*size=(\d+)/i", $line, $matches)) {