Re: Small addition for Dovecot

Niels Baggesen <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
On Thu, Jul 10, 2008 at 09:49:13PM +0200, Niels Baggesen wrote:
> I am running CentOS 5.2 with Dovecot. On that system all Disconnected
> messages are followed by a "Connection closed" message that is unknown
> by the filter. 

Well, getting a bit more into the detailes, the proper patch is

Index: scripts/services/dovecot
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/dovecot,v
retrieving revision 1.11
diff -u -r1.11 dovecot
--- scripts/services/dovecot    30 Jun 2008 23:07:51 -0000      1.11
+++ scripts/services/dovecot    21 Jul 2008 18:46:44 -0000
@@ -147,6 +147,9 @@
    } elsif (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/) ) {
       $Disconnected{$Reason}++;

+   } elsif ($ThisLine =~ /(IMAP|POP3).+: (Connection closed.*)/) {
+      $Disconnected{$2}++;
+
   } else {

It turns out that the "Connection closed" have their own right (this
makes the stats match up for connected and disconnected messages)

/Niels

-- 
Niels Baggesen -- @home -- Århus -- Denmark -- [email protected]
The purpose of computing is insight, not numbers  --  R W Hamming
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.