perl newbie question

Youn Gonzales ispmgr at CLAS.NET
Mon Feb 11 14:59:16 GMT 2002


Actually, the mrtg.cfg file provided by Julian calls sendmail.logs.pl. I
just changed my configuration to run mrtg for the mail statistics on an
hourly basis instead of every 5 minutes. I don't yet have confidence in the
information graphed by mrtg for the mail traffic, and as soon as I resolve
another issue that I am having with SpamAssassin I am going to look into it.

There is an Interval option for mrtg that I found on their web site
(http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html) which
controls part of how the information is segmented. Hopefully I will get more
time to play with it soon!

:-)

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


----- Original Message -----
From: "Miguel Koren O'Brien de Lacy" <miguelk at KONSULTEX.COM.BR>
To: <MAILSCANNER at JISCMAIL.AC.UK>
Sent: Sunday, February 10, 2002 6:23 AM
Subject: Re: perl newbie question


> I got sendmail.logs.pl running but I could not get any graphs with MRTG
(yet). I
> believe that sendmail.logs.pl needs to be run regularly in order to append
to a
> file for MRTG to graph, right? How often are you running it? Your graphs
seem to
> be cumulative and is this because you are processing the log files from
the
> start each time? Do you have any ideas about how to process only that part
that
> was not processed in the last run?
>
> Miguel
>
> Youn Gonzales wrote:
>
> > Resolved. My firewall was blocking the syslog entries. Also, if you are
> > relaying mail and force-routing it to another server (i.e. mailertable
> > entries) it is a good idea not to have the destination server set to
> > throttle connections or filter based on subject line, etc., as your mail
> > queues tend to fill up fairly quickly.
> >
> > FYI, I am running on Redhat 7.1 on a Compaq Proliant, quad P-Pro-200
with
> > 1.4G RAM. You can view my mrtg stats at http://mailscan.clas.net as well
as
> > some other stats as I was playing with mrtg. I just changed the MX
record
> > for a few of our domains, so the box isn't nearly under full load yet,
but
> > so far it looks promising. Also, we are currently scanning only incoming
> > mail. I have to get another server up and running before we start
scanning
> > incoming and outgoing mail.
> >
> > Youn Gonzales
> > System Administrator
> > Comptia A+, Network+, INET+,
> > Cisco CCNA/CCDA Certified Technician
> > Microsoft Certified Professional
> >
> > ----- Original Message -----
> > From: "Youn Gonzales" <ispmgr at clas.net>
> > To: <MAILSCANNER at JISCMAIL.AC.UK>
> > Sent: Saturday, February 09, 2002 12:49 PM
> > Subject: perl newbie question
> >
> > > I am running mailscanner on redhat 7.1 and everything appears to be
> > > functioning fine, but I have been unable to get the sendmail.logs.pl
> > 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?
> > >
> > > Thanks!
> > >
> > > :-)
> > >
> > > Youn Gonzales
> > > System Administrator
> > > Comptia A+, Network+, INET+,
> > > Cisco CCNA/CCDA Certified Technician
> > > Microsoft Certified Professional



More information about the MailScanner mailing list