perl newbie question

Youn Gonzales ispmgr at CLAS.NET
Sat Feb 9 18:49:04 GMT 2002

I am running mailscanner on redhat 7.1 and everything appears to be
functioning fine, but I have been unable to get the script
to work properly so that I can use mrtg to monitor the traffic. The total
number of message is working properly, but the script always reports (0)
spam and virus messages detected. Mailscanner is detecting messages that
contain a virus and/or appear to be spam, as it is tagging the spam and
cleaning the messages that contain a virus. As I am a perl newbie, I do not
understand how the script is parsing the logs and counting the virus and
spam containing messages, but it would appear that everything happens here:

    if (/mailscanner/) {
      $TotalViruses += $1 if /found (\d+) viruses in/i;
      $TotalSpam++        if /message [^\s]+ is spam/i;

Could someone please explain exactly how these variables are incremented -
i.e. under what conditions these three if statements evaluate as true and
how they work?



Youn Gonzales
System Administrator
Comptia A+, Network+, INET+,
Cisco CCNA/CCDA Certified Technician
Microsoft Certified Professional

More information about the MailScanner mailing list