• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Spamassassin Stats / sa-stats.pl

T

teknovision

Guest
Hi all,

I'm trying to obtain some Spamassassin stats for me server (average score, messages processes by spamassassin, volumes.. .). I don't seem able to run sa-stats.pl, it gives me an error:

Missing $ on loop variable at ./sa-stats.pl line 20.

Any ideas how I can fix this? Also, if you have come across better software to achieve the above welcome?

Manyt thanks for any help!!

.//phil
 
no idea what you got there or where it is from. but in the original script line 20 is still comments ...

download again from:
http://0wned.it/scripts/

works for me, tho im still looking for something more fancy :D
 
hmm, thanks for your reply.

I went to the link you sent me and copy-pasted code from 'pretty code' link, put the text in a file created by root then, did the below:

# ./sa-stats.pl -h
-bash: ./sa-stats.pl: Permission denied


Do I have to modify the code in anyway? These are permissions it has:

-rw-r--r-- 1 root root 12485 Jan 29 20:59 sa-stats.pl

I chmod'd file to 0777 and did:

./sa-stats.pl -h

The cursor goes to the next line and nothing else happens. I have left it for 10 minutes and nothing seems to happen!?

A better result then previously but still no outcome! I appreciate your help on the matter really a newbie in this world!! Many thanks for your help!

.//phili
 
always helps to actually read the code ...

chmod +x sa-stats.pl

./sa-stats.pl < /usr/local/psa/var/log/maillog
 
Still the same problem. Cchmoded file as per your instructions then entered:

./sa-stats.pl < /usr/local/psa/var/log/maillog

Hit enter and the cursor drops a line and stays, nothing happens.
 
Ok, so problem appeared to be size of log file, which is 3Gb large - put another post on the forum as that seems a tad excessive, non!!

The script ran but I got the below:

# ./sa-stats.pl < /usr/local/psa/var/log/maillog -t
SpamAssassin statistics for today (Jan 30)
----------------------------------------------------------------------

No ham (clean) messages found in logfile.
No spam (identified) messages found in
logfile.
Due to the above, not enough information is available to
calculate
global statistics.

Username: Total: Ham: Spam: % Spam:
----------------------------------------------------------------------

Newline in left-justified string for printf at ./sa-stats.pl line 241, <STDIN> line 26191956.
Username: Avg. ham score: Avg. spam
score:
----------------------------------------------------------------------



Any ideas at all what that would mean, not really very knowledgeable at the moment. Your patience is very much appreciated irzyxel!! Any help would be muchly appreciated.

.//phil
 
lol, only if you process 12 million mails a day ;)

make sure the format is really as it should be
 
Back
Top