Changed regex to match new logformat, fixes #1398

Signed-off-by: Roman Schmerold <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold
2014-05-07 09:34:34 +02:00
parent 32ff9840b8
commit 0d1fc17db9

View File

@@ -192,7 +192,7 @@ class MailLogParser {
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)) {
} elseif (preg_match("/dovecot.*(?::|\]) pop3\(.*@([a-z0-9\.\-]+)\):.*in=(\d+).*out=(\d+)/i", $line, $matches)) {
// Dovecot POP3
$this->_addDomainTraffic($matches[1], $matches[2], $timestamp);
}