[Logwatch-Devel] Re: Patch for mailscanner script in Logwatch

Mike Tremaine mgt at stellarcore.net
Mon Jun 13 14:41:34 MST 2005


On Fri, 2005-06-10 at 09:07, Patrick Vande Walle wrote:
> Hello Mike,
> 
> Attached is a patch against ver. 1.9 of the mailscanner script for
> Logwatch
> 
> It adds Bitdefender and Antivir support.
> 

This has been commited to CVS.. Here is the diff

[mgt at dwarfstar services]$ cvs diff mailscanner
Index: mailscanner
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/mailscanner,v
retrieving revision 1.9
diff -r1.9 mailscanner
103c103,110
<    } elsif ($ThisLine =~ m/^\/var\/spool\/MailScanner\/incoming\/.+:
([\w\_\-\.\/]+) FOUND/i) {
---
>    } elsif ($ThisLine =~ m/Contains signature of the worm (.+)/) {
>       $VirusType_Antivir{$1}++;
>       $MailScan_Virus_Antivir++;
>    } elsif ($ThisLine =~ m/:infected: (.+)/i) {
>       #without the leading : this would match Fprot so error on the
side of matching to much -mgt
>       $VirusType_BitDefender{$1}++;
>       $MailScan_Virus_BitDefender++;
>     } elsif ($ThisLine =~ m/^\/var\/spool\/MailScanner\/incoming\/.+:
([\w\_\-\.\/]+) FOUND/i) {
249a257,270
> if (keys %VirusType_Antivir) {
>    print "\nAntivir Virus Report: (Total Seen =
$MailScan_Virus_Antivir)\n";
>    foreach $ThisOne (sort keys %VirusType_Antivir) {
>       print '    ' . $ThisOne . ': ' . $VirusType_Antivir{$ThisOne} .
" Times(s)\n";
>    }
> }
>
> if (keys %VirusType_BitDefender) {
>    print "\nBitDefender Virus Report: (Total Seen =
$MailScan_Virus_BitDefender)\n";
>    foreach $ThisOne (sort keys %VirusType_BitDefender) {
>       print '    ' . $ThisOne . ': ' .
$VirusType_BitDefender{$ThisOne} . " Times(s)\n";
>    }
> }
>

-- 
Mike Tremaine
mgt at stellarcore.net
http://www.stellarcore.net



More information about the Logwatch-Devel mailing list