Hi!
Graph template from Sven worked indeed for me!
(FC6, Cacti 0.8.6i)
The other problem I have is that i'm running the watchmaillog.sh script remotely on our mailserver. (FC5, Plesk8.1). On this server we've setup SpamAssassin which is running fine. It produces output in the maillog like
Code: Select all
Feb 26 21:23:39 giant spamd[21797]: spamd: processing message <000b01c759e3$fb7e38b0$6601a8c0@kibernet-gw.corbina.net> for user@domain.com:110
Feb 26 21:23:51 giant spamd[21797]: spamd: clean message (3.1/7.0) for user@domain.com:110 in 12.0 seconds, 35663 bytes.
Feb 26 21:23:51 giant spamd[21797]: spamd: result: . 3 - EXTRA_MPART_TYPE,HTML_10_20,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET scantime=12.0,size=35663,user=user@domain.com,uid=110,required_score=7.0,rhost=localhost,raddr=127.0.0.1,rport=/tmp/spamd_full.sock,mid=<000b01c759e3$fb7e38b0$6601a8c0@kibernet-gw.corbina.net>,autolearn=no
So I changed this::
Code: Select all
# Look for MailScanner spam scanning batch results
if($line=~/Spam\ Checks\:\ Found/){
$item="spam";
$spam_count_pos = index($line,"Spam\ Checks\:\ Found");
$spam_count_pos2 = index($line, "\ spam\ messages");
$spam_count = substr($line,($spam_count_pos+19),($spam_count_pos2-($spam_count_pos+19)));
&readcounterfile;
$counter{$item}=$counter{$item}+$spam_count;
if($debug){print("Found $spam_count SPAM in the MailScanner batch, incrementing the spam counter to $counter{$item}.\n");}
&writecounterfile;
}
to this::
Code: Select all
# Look for MailScanner spam scanning batch results
if($line=~/is\ spam/ || $line=~/spamd\: identified spam/){
$item="spam";
$spam_count_pos = index($line,"Spam\ Checks\:\ Found");
$spam_count_pos2 = index($line, "\ spam\ messages");
$spam_count = substr($line,($spam_count_pos+19),($spam_count_pos2-($spam_count_pos+19)));
&readcounterfile;
$counter{$item}=$counter{$item}+$spam_count;
if($debug){print("Found $spam_count SPAM in the MailScanner batch, incrementing the spam counter to $counter{$item}.\n");}
&writecounterfile;
}
But still all my counters are 0!!! :s
At plesk the maillog is at /usr/local/psa/var/log/maillog, so I symlinked /var/log/maillog -> /usr/local/psa/var/log/maillog
I also did a
Code: Select all
cat /var/log/maillog | grep "spamd: identified spam"
which gave me around 50 lines of found spam entries.
So I seems to work ...
Anyone an idea??
[EDIT]
I'm using ClamAV as virus-scanner. It is reporting to /var/log/clamav/clamd.log Can I change that somewhere??
Thanks!
Onno.