On Tue, 30 Dec 2003 12:13:16 -0800, Ray Dzek wrote:

>  Is there some perl script or such that can tell us rules triggered
>  on spamc/spamd and graph how often each rule is triggered?

If you get it to log results, a not too complex perl script could do this. If you're 
using MIMEDefang, you can use my perl script and a couple of lines in 
mimedefang-filter straight as they are (without mimedefang, you'll need to make SA or 
whatever calls SA log the results and modify my script to parse that log correctly). 
Ah, if you do use the script, read the "use" clauses at the top to find out what perl 
modules you'll need as well.

The result (calculated on data from 2003-12-23 21:18 to 2003-12-31 19:56):
http://whatever.frukt.org/graphdefang/?view=_totals_#totals_700_SpamScores.png

My script:
http://whatever.frukt.org/mimedefang-filter.shtml#spam-info-stats

My mimedefang-filter:
http://whatever.frukt.org/mimedefang-filter.shtml#mimedefang-filter

The important lines in mimedefang-filter:
if ($Features{"SpamAssassin"}) {
        my $relay_host_name = "";
        $relay_host_name = $RelayHostname if (defined($RelayHostname));
        my $all_recipients = "";
        foreach my $currecipient(@Recipients) {
                $all_recipients .= "," if ($all_recipients ne "");
                $all_recipients .= $currecipient;
        if ((-s "./INPUTMSG" < 200*1024) && !check_internal_whitelist($RelayAddr)) {
                # code snipped
                md_syslog('info', "spam-info: 
$hits/$req,$Sender,$relay_host_name,$RelayAddr,$Helo;$names;$all_recipients");
        } else {
                md_syslog('info', "spam-info: 
-,$Sender,$relay_host_name,$RelayAddr,$Helo;;$all_recipients");
        }
}

If you do decide you want to use my stuff, download the scripts from the links (the 
headers) rather than cut'n and paste them. They are included in the page straight as 
they are without any conversion to proper HTML entities, so they the stuff in the page 
might be garbled.

Regards
/Jonas

--
Jonas Eckerman, [EMAIL PROTECTED]
http://www.fsdb.org/



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to