Package: logwatch Version: 7.3.1-5 Severity: normal
The following patch gives counts of rate-limit warnings on a per-host basis instead of the current functionality which is to list all the warning messages. This may not be needed with the new version of logwatch, but if this is not a candidate for an Etch update then I would like the bug to stay open until Lenny is released so that anyone who needs this functionality can find the patch. --- postfix-pre-rate-limit 2007-09-12 11:39:49.000000000 +1000 +++ /usr/share/logwatch/scripts/services/postfix 2007-09-12 11:44:33.000000000 +1000 @@ -302,6 +302,8 @@ } elsif ( ($Host,$Recip,$Reason) = ($ThisLine =~ /reject: RCPT from ([^ ]*\[[^ ]*\]): $re_DSN <(.*)>: Recipient address rejected: (.*);/)) { $Temp = "$Host : $Reason"; $RejectRecip{$Recip}{$Temp}++; + } elsif ( ($Host) = ($ThisLine =~ /warning: Recipient address rate limit exceeded: [0-9]* from ([^ ]*) for service smtp/)) { + $RecipientRateLimit{$Host}++; } elsif ( ($Host,undef) = ($ThisLine =~ /reject: RCPT from ([^ ]*\[[^ ]*\]): $re_DSN <(.*)>: Sender address rejected: Access denied;/)) { $RejectAddress{$Host}++; } elsif ( ($Host,$Site,$Reason) = ($ThisLine =~ /reject: RCPT from ([^ ]*\[[^ ]*\]): $re_DSN Service unavailable; (?:Client host )?\[[^ ]*\] blocked using ([^ ]*), reason: (.*);/)) { @@ -778,6 +780,13 @@ } } +if (keys %RecipientRateLimit) { + print "\n\nRecipient address rate limit exceeded warning counts by host:\n"; + foreach $Host (keys %RecipientRateLimit) { + print " $Host : $RecipientRateLimit{$Host}\n"; + } +} + if (keys %HeaderWarning) { if ($Detail >= 10) { print "\n\nHeader content warning (but passed):\n"; -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-3-xen-686 Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Versions of packages logwatch depends on: ii perl 5.8.8-7 Larry Wall's Practical Extraction ii postfix [mail-transport-agent 2.3.8-2+b1 A high-performance mail transport Versions of packages logwatch recommends: ii libdate-manip-perl 5.44-5 a perl library for manipulating da -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]