patch for scripts/services/mailscanner
Nerijus Baliunas <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
recent MailScanner version added clamd support, output in log files is:
Jun 24 21:50:16 mail MailScanner[13398]: INFECTED:: HTML.Phishing.Auction-149 FOUND :: ./52AF0179173.E694B/msg-13398-61.html
Jun 24 21:50:16 mail MailScanner[13398]: Virus Scanning: Clamd found 1 infections
Here is a patch to recognize it:
--- mailscanner.orig 2007-04-13 16:51:58.000000000 +0300
+++ mailscanner 2007-06-26 16:07:38.000000000 +0300
@@ -139,6 +139,9 @@
} elsif ($ThisLine =~ m/ClamAVModule::INFECTED:: (.+)::/) {
$VirusType_ClamAVModule{$1}++;
$MailScan_Virus_ClamAVModule++;
+ } elsif ($ThisLine =~ m/INFECTED:: (.+) FOUND ::/) {
+ $VirusType_Clamd{$1}++;
+ $MailScan_Virus_Clamd++;
} elsif ($ThisLine =~ m/\/.+ Infection: (.+)/i) {
$VirusType_Fprot{$1}++;
$MailScan_Virus_Fprot++;
@@ -367,6 +370,13 @@
}
}
+if (keys %VirusType_Clamd) {
+ print "\nClamd Virus Report: (Total Seen = $MailScan_Virus_Clamd)\n";
+ foreach $ThisOne (sort keys %VirusType_Clamd) {
+ print ' ' . $ThisOne . ': ' . $VirusType_Clamd{$ThisOne} . " Time(s)\n";
+ }
+}
+
if (keys %VirusType_Fprot) {
print "\nF-Prot Virus Report: (Total Seen = $MailScan_Virus_Fprot)\n";
foreach $ThisOne (sort keys %VirusType_Fprot) {
Regards,
Nerijus