Package: logwatch
Version: 7.3.6.cvs20080702-2
Severity: wishlist
Tags: patch

uw-imapd generates lines unmatched by rules in the imapd service script.
Patch included.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- /usr/share/logwatch/scripts/services/imapd  2008-12-31 12:31:13.000000000 
+0100
+++ imapd       2009-08-05 23:25:09.078394758 +0200
@@ -38,7 +38,10 @@
       ($ThisLine =~ /^couriertls: read: Connection reset by peer/ ) or
       # timeouts are reported in some other scripts - maybe it should be here 
too?
       ($ThisLine =~ /^couriertls: read: Connection timed out/ ) or
-      ($ThisLine =~ /^LOGOUT, ip=\[(.*)\], rcvd=\d+, sent=\d+$/)
+      ($ThisLine =~ /^LOGOUT, ip=\[(.*)\], rcvd=\d+, sent=\d+$/) or
+      # uw-imapd
+      ($ThisLine =~ /^Moved \d+ bytes of new mail to.*$/) or
+      ($ThisLine =~ /^Unexpected client disconnect, while reading line.*$/)
    ) {
       # Don't care about these...
    } elsif ( ($User, $Host) = ( $ThisLine =~ /^Login user=(.*?) 
host=(.*\[.*\])$/ ) ) {
@@ -67,6 +70,10 @@
    } elsif ( ($User, $Host) = ( $ThisLine =~ /^Logout user=(.*?) 
host=(.*\[.*\])$/) ) {
       $Logout{$User}{$Host}++;
       $Logout2{$User}++;
+   # More generic pattern for uw-imapd
+   } elsif ( ($User, $Host) = ( $ThisLine =~ /^Logout user=(.*?) host=(.*)$/) 
) {
+      $Logout{$User}{$Host}++;
+      $Logout2{$User}++;
    } elsif ( ($dummy, $User, $Host, $DownloadSize1, $DownloadSize2) = ( 
$ThisLine =~ /^(LOGOUT|TIMEOUT|DISCONNECTED), user=(.*?), ip=\[([^ ,]+)\](?:, 
port=\[\d+\])?, headers=(\d+), body=(\d+)/o ) ) {
       $Logout{$User}{$Host}++;
       $Logout2{$User}++;

Reply via email to