[Techtalk] perl help

Maria McKinley maria at shadlen.org
Wed Oct 15 05:22:04 UTC 2008


Hello all,

This talk about spam got me started looking at my spam filter again, 
since it has been a while. I ran across a perl script to analyze mail 
logs to see how the spamfilter is doing.

http://www.rulesemporium.com/programs/sa-stats-1.0.txt

Unfortunately, I'm not too good with perl, and I can't figure out why I 
am not getting any good stats. I assume it is probably because it is 
looking in the wrong logs or something. The default directory seems 
correct, /var/log, so I changed this line

if (!defined $FILE) { $FILE='^maillog$' }  # regex

to this:

if (!defined $FILE) { $FILE='^mail.log$' }  # regex

because my mail log is called mail.log (I also tried using just mail), 
but this didn't help.

Here is the output, which cannot possibly be coming from my mail log.

ella:~# ./sa-stats.pl -r @shadlen.org

SPAM STATS FOR @shadlen.org
------------------------------------------------------------
Email:        0  Autolearn:     0  AvgScore:   0.00  AvgScanTime:  0.00 sec
Spam:         0  Autolearn:     0  AvgScore:   0.00  AvgScanTime:  0.00 sec
Ham:          0  Autolearn:     0  AvgScore:   0.00  AvgScanTime:  0.00 sec

Time Spent Running SA:         0.00 hours
Time Spent Processing Spam:    0.00 hours
Time Spent Processing Ham:     0.00 hours

TOP SPAM RULES FIRED FOR @shadlen.org
----------------------------------------------------------------------
RANK	RULE NAME               	COUNT  %OFMAIL %OFSPAM  %OFHAM
----------------------------------------------------------------------
----------------------------------------------------------------------

TOP HAM RULES FIRED FOR @shadlen.org
----------------------------------------------------------------------
RANK	RULE NAME               	COUNT  %OFMAIL %OFSPAM  %OFHAM
----------------------------------------------------------------------
----------------------------------------------------------------------

Any hints? Maybe just tell me how to print out what directory/file it 
thinks it is suppose to use?

thanks,
maria


More information about the Techtalk mailing list