Blame SOURCES/logwatch-dovecot.patch

aa46a8
Update dovecot log parsing.
aa46a8
aa46a8
Author: Frank Crawford <frank@crawford.emu.id.au>
aa46a8
Author: Karel Klic <kklic@redhat.com>
aa46a8
RH-Bugzilla: #645962
aa46a8
aa46a8
--- logwatch-svn127/scripts/services/dovecot.orig	2012-12-30 17:24:53.000000000 +0100
aa46a8
+++ logwatch-svn127/scripts/services/dovecot	2013-01-09 09:09:45.256236296 +0100
aa46a8
@@ -150,7 +150,7 @@ while (defined($ThisLine = <STDIN>)) {
aa46a8
          # We don't care about these
aa46a8
      } elsif ( $ThisLine =~ /Killed with signal /) {
aa46a8
          $End++;
aa46a8
-     } elsif ( $ThisLine =~ /Dovecot (v\d[^ ]* |)starting up( \(core dumps disabled\))?$/) {
aa46a8
+     } elsif ( $ThisLine =~ /Dovecot (v\d[^ ]* |)starting up( \(.*\))?$/) {
aa46a8
          $Restarts++;
aa46a8
          $End = 0;
aa46a8
      } elsif ( ( ($User, $Host) = ( $ThisLine =~ /^pop3-login: Login: (.*?) \[(.*)\]/ ) ) or
aa46a8
@@ -181,15 +181,15 @@ while (defined($ThisLine = <STDIN>)) {
aa46a8
       }
aa46a8
 
aa46a8
 # 'lda' for dovecot 2.0, 'deliver' for earlier versions
aa46a8
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): msgid=.*: saved mail to (\S+)/ ) ) {
aa46a8
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): msgid=.*: saved mail to (.*)/ ) ) {
aa46a8
       $Deliver{$User}{$Mailbox}++;
aa46a8
 
aa46a8
 # For Sieve-based delivery
aa46a8
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda\(|deliver\(|lmtp\(\d+, )(.*)\): (?:[^:]+: )?sieve: msgid=.*: stored mail into mailbox '([^']*)'/ ) ) {
aa46a8
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {
aa46a8
       $Deliver{$User}{$Mailbox}++;
aa46a8
 
aa46a8
 # LMTP-based delivery
aa46a8
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (\S+)/ ) ) {
aa46a8
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (.*)/ ) ) {
aa46a8
     # dovecot: [ID 583609 mail.info] lmtp(12782, cloyce@headgear.org): jBt1EfjCMk3uMQAAm9eMBA: msgid=<4D32DB1F.3080707@c-dot.co.uk>: saved mail to INBOX
aa46a8
       $Deliver{$User}{$Mailbox}++;
aa46a8