Announce: mailscanner-mrtg new version 0.02
Matthijs Althoff
scouty at BROMBERG.DEMON.NL
Thu Dec 12 14:03:14 GMT 2002
On Sun, 8 Dec 2002 15:59:07 -0600, Dale Lovelace
<dlovelace at HOTELS.COM> wrote:
Hi Dale,
> Thanks to everyone who sent in a suggestion or a fix. I have put
> together a lot of those suggestions and (I think) all of the fixes
> people have sent me. Here is the changelog for version 0.02:
It looks great mesages, spam etc only the viruses stays
at zero for some reason but my maillog tells me yesterday
there was one found..
sendmail : Sendmail 8.12.5/8.12.5
Mail-scanner : 4.10-3
mailscanner-mrtg: 0.02-1
uvscan mcafee linux : v4.14.0 / Scan engine v4.1.60
/ Virus data file v4237
------------------------------------------
start snip from /var/log/maillog
------------------------------------------
MailScanner[22423]: New Batch: Scanning 1 messages, 70917 bytes
MailScanner[22423]: Virus and Content Scanning: Starting
bromberg MailScanner[22423]: /gB9JUjjF030766/MLSET32.EXE Found the
W32/Magistr.a at MM virus !!!
MailScanner[22423]: Virus Scanning: mcafee found 1 infections
MailScanner[22423]: Virus Scanning: Found 1 viruses
MailScanner[22423]: Filename Checks: Windows/DOS Executable (MLSET32.EXE)
MailScanner[22423]: Other Checks: Found 1 problems
MailScanner[22423]: Saved entire message to......
MailScanner[22423]: Saved infected "MLSET32.EXE" to.......
MailScanner[22423]: Cleaned: Delivered 1 cleaned messages
------------------------------------------
end snip from /var/log/maillog
------------------------------------------
------------------------------------------
start snip from /usr/sbin/mailscanner-mrtg
------------------------------------------
sub Virus {
if ($debug) { Debug("Beginning sub Virus") }
my($sec,$hour,$mday,$mon,$year,$wday,$yday,$isdst,$month);
if ($Config{"parseentireviruslog"} eq "yes") {
if ($debug) { Debug("Parse Entire Virus Log", "yes") }
} else {
if ($debug) { Debug("Parse Entire Virus Log", "no") }
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$month = FixMonth($mon);
if ($debug) {
Debug("sec", $sec);
Debug("min", $min);
Debug("hour", $hour);
Debug("mday", $mday);
Debug("mon", $mon);
Debug("year", $year);
Debug("wday", $wday);
Debug("yday", $yday);
Debug("isdst", $isdst);
Debug("month", $month);
}
}
open(LOG, $Config{"viruslog"})
or (warn("Cannot access viruslog skipping, $!"), next);
while(<LOG>) {
chomp;
if ($Config{"parseentireviruslog"} eq "yes") {
if (/MailScanner/) { $Total += $1 if /found (\d+) viruses/i; }
} else {
if (/$month\s+$mday.+/) {
if (/MailScanner/) { $Total += $1 if /found (\d+) viruses/i; }
}
}
next;
}
close LOG;
if ($debug) {
Debug("Total", $Total);
Debug("Leaving sub Virus");
}
}
------------------------------------------
end snip from /usr/sbin/mailscanner-mrtg
------------------------------------------
More information about the MailScanner
mailing list