Question regarding the Message.pm in lib/MailScanner

Julian Field mailscanner at ecs.soton.ac.uk
Sun Apr 6 12:01:39 IST 2003


At 10:42 06/04/2003, you wrote:
>This one goes probably direct to Julian, as he might know best about it ,-))
>
>I added a new function to CustomConfig.pm to get some extended logging about
>spam and virus for each mail. Although I found the information about spam
>quite easy for viruses it simply overwhelmed me, whats available in the
>message object ,-)) What is the appropriate hash or array to look at If I
>simply wan to know what's the name of the virus, if one has been found?

The output parsers don't extract the name of the virus (except F-Prot and
F-Secure if I remember rightly).
The scanner report lines are stored though, so you could try and extract it
from there, just for the scanners you are using.

while(($filename, $report) = each %{$message->{virusreports}}) {
   push @allreports, split(/\n/, $report);
}
# You now have 1 virus report in each element of @allreports.
# So, knowing the output structure of your particular scanner(s),
# you can pull out the name of the virus.

--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list