I include a perl script below that can be used on any non-SPAM email message to extract the scores.
It *might* work for you :)
YMMV
Anthony



##################################################


#!/usr/bin/perl

my @snet = "";
my @slocal = "";


$filename = "/usr/share/spamassassin/50_scores.cf" ;
&getinput;
@file=`ls /etc/mail/spamassassin/*.cf`;
foreach $filename (@file) {
chomp($filename);
&getinput;
}
#
$sasum=0;
while (<>) {
if (/tests=/) { $mark = 1;}
if (/version=/) { $mark = 0;}
if ($mark) { $line = $_ ;
$line =~ s/tests=// ;
@s=split(",",$line);
foreach $j (@s) {
if ( ! $j ) {next;}
if ( $j eq "\n" ) {next;}
if ( $j eq "" ) {next;}
while ( $j =~ / |\t/ ) { $j =~ s/ |\t// ;}
chomp($j);
$sasum += $snet{$j} ;
print $j," ",$snet{$j},"\n";
} }
}


print "$sasum\n";;
exit;

sub getinput {
open (FO,"$filename");
@l=<FO>;
close (FO);
foreach $i (@l){
if ($i =~ /score/ ) {
@e=split(/ /,$i);
chomp($e[1]);
if ( ! $e[1] ) {next;}
$slocal{$e[1]}=$e[2];
if ( ! $e[3] ) { $e[3] = $e[2] ;}
$snet{$e[1]}=$e[3];
chomp($snet{$e[1]});
        }
        }
}








------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to