Patch to dovecot filter

Patrick Vande Walle <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Organization Internet Society Luxembourg
Message-ID <[email protected]>
Attached is a patch against rev 1.6 of the Dovecot filter. It is
cosmetic only.
Some IPv6 addresses can be very long.  The "host" column  is now set to
the maximum theoretical width of an IPv6 address.


Revision 1.7
Cosmetic: Set host column to the maximum width of an IPv6 address.


Best regards,

Patrick Vande Walle

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
dovecot.diff (text/plain, 1.7 KB)
--- dovecot.orig	2007-05-31 08:16:13.000000000 +0200
+++ dovecot	2007-05-31 09:13:36.000000000 +0200
@@ -132,8 +132,8 @@
 if ( ( $Detail >= 5 ) and (keys %Connection)) {
    print     "\n[Dovecot IMAP and POP3] Connections:".
              "\n====================================".
-             "\n                      Host |     POP3    |   IMAP   |   Total ".
-             "\n-------------------------- | ----------- |--------- | ---------";
+             "\n                                  Host |    POP3   |   IMAP   |   Total ".
+             "\n-------------------------------------- | --------- |--------- | ---------";
   
    $TLSInitFail = 0;
    foreach $Host (sort keys %Connection) {
@@ -151,9 +151,9 @@
 # Cleanly display IPv4 addresses
       $Host=~ s/::ffff://;
       $HostLength = length($Host);
-      $HostSpaceLength = 26 - $HostLength;
+      $HostSpaceLength = 38 - $HostLength;
       $CountLength = length("$Conns");
-      $CountSpaceLength = 12 - $CountLength;
+      $CountSpaceLength = 10 - $CountLength;
       $IMAPLength = length("$IMAP");
       $IMAPSpaceLength = 9 - $IMAPLength;
       $TotalLenght = length("$Total");
@@ -165,12 +165,12 @@
       $TotalCount += $Total;
    }
    $POP3Length = length("$POP3Count");
-   $POP3SpaceLength = 40 - $POP3Length;
+   $POP3SpaceLength = 50 - $POP3Length;
    $IMAPLength = length("$IMAPCount");
    $IMAPSpaceLength = 9 - $IMAPLength;
    $TotalLength = length("$TotalCount");
    $totalSpaceLength = 10 - $TotalLength;
-   print "\n" . "-" x 63;
+   print "\n" . "-" x 73;
    print "\n" . " " x $POP3SpaceLength . $POP3Count . " |" . " " x $IMAPSpaceLength . $IMAPCount .
                  " |" . " " x $totalSpaceLength . $TotalCount . "\n";
 }
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.