Patch for MailScanner script
John Wilcock <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Attached is a patch to cater for some recent enhancements in MailScanner. Firstly, three messages relating to the processing-attempts database. These are merely informative so I choose to ignore them rather than count. MailScanner has its own notification system if too many attempts are made to process a message, but I've never actually had this trigger on my system so I guess there are other log messages in that case anyway. Secondly, enhancements to the spamassassin timeout handling. John. -- -- Over 4000 webcams from ski resorts around the world - www.snoweye.com -- Translate your technical documents and web pages - www.tradoc.fr _______________________________________________ Logwatch-Devel mailing list [email protected] http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
mspatch.txt
(text/plain, 1.9 KB)
--- mailscanner-1.36 2009-07-31 09:12:29.000000000 +0200
+++ /etc/logwatch/scripts/services/mailscanner 2009-07-31 09:05:03.000000000 +0200
@@ -129,7 +127,10 @@
#This for Kaspersky I guess it is duplicated by Content checks, remove if not -mgt
( $ThisLine =~ m/^\/var\/spool\/MailScanner\/incoming\/.+SUSPICION/ ) or
( $ThisLine =~ m/^SpamAssassin temporary working directory is/ ) or
- ( $ThisLine =~ m/ignored whitelist, had .+ recipients/ )
+ ( $ThisLine =~ m/ignored whitelist, had .+ recipients/ ) or
+ ( $ThisLine =~ m/Connected to Processing Attempts Database/ ) or
+ ( $ThisLine =~ m/Deleted .+ messages from processing-database/) or
+ ( $ThisLine =~ m/Found .+ messages in the Processing Attempts Database/ )
) {
# We don't care about these
} elsif ( $ThisLine =~ m/New Batch: Scanning ([0-9]+) messages, ([0-9]+) bytes/i) {
@@ -252,6 +253,10 @@
$MailScan_Spam_Act{$1}++;
} elsif ($ThisLine =~ /SpamAssassin timed out and was killed/) {
$SA_timeout++;
+ } elsif ($ThisLine =~ /Disabling SpamAssassin network checks/) {
+ $SA_disablenet++;
+ } elsif ($ThisLine =~ /SpamAssassin timed out \(with no network checks\)/) {
+ $SA_timeout_nonet++;
} elsif ( $ThisLine =~ m/Message .+ from (.+ \(.+\)) is whitelisted/ ) {
$MailScan_Whitelisted++;
$Whitelisted_Host{$1}++;
@@ -386,6 +391,15 @@
print "\n\t" . $SA_timeout . " SpamAssassin timeout(s)\n";
}
+if ($SA_disablenet > 0) {
+ print "\t" . $SA_disablenet . " attemps to stop timeouts by disabling network checks\n";
+}
+
+if ($SA_timeout_nonet > 0) {
+ print "\t" . $SA_timeout_nonet . " SpamAssassin timeout(s) after disabling network checks\n";
+}
+
+
if (keys %VirusScannerTimeout) {
print "\n\t" . $MailScan_ScannerTimeout . " virus scanner timeout(s)\n";
foreach $ThisOne (sort keys %VirusScannerTimeout) {