[Mimedefang] Requesting help making a mod to my filter

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Tue Oct 25 14:24:17 EDT 2005


Fred wrote:
> Hello,
> I would like to modify my filter to include the scores for the
> spamassassin tests next to the name of the test,
> Using SA config options you can make your X-Spam-Score line look like
> this: 
> 
> BAYES_50=0.001,HTML_MESSAGE=0.0001,FOO=1.0, etc.
> 
> Is it possible to reproduce this in the mimedefang-filter?

This is a mimedefang.pl hack that might work for you.  Untested.

sub spam_assassin_check (;$) {

    my($status) = spam_assassin_status(@_);
    return undef if (!defined($status));

    my $hits = $status->get_hits;
    my $req = $status->get_required_hits();
# CHANGE LINE
#   my $tests = $status->get_names_of_tests_hit();
    my $tests = $status->get_tag("TESTSSCORES");

    my $report = $status->get_report();

    $status->finish();

     return ($hits, $req, $tests, $report, $testsscores);
}

-- 
Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer




More information about the MIMEDefang mailing list