[Mimedefang] add to sa score for clients that only give hostname in helo.

Joseph Brennan brennan at columbia.edu
Mon Mar 8 14:42:45 EST 2004



--On Monday, March 8, 2004 11:55 AM -0700 Lucas Albers 
<admin at cs.montana.edu> wrote:

> I was working adding to the  sa score for clients that only have a
> hostname component.


I found the simplest way was to add scores and reasons to two
variables in Mimedefang, and then tack them on to Spamassassin's
output right after it runs.


Start off:

sub filter_begin () {

    # Spamassassin tweaks using relay information
    $SA_score_additions = 0;
    $SA_test_additions = "";


Then add scores and descriptions as needed:

    # Prejudice against no rDNS
    if ($RelayHostname =~ /\[$RelayAddr\]/) {
        $SA_score_additions += 2.5;
        $SA_test_additions .= ",CU_NO_RDNS";
    }

Then at the end, run Spamassassin in the usual way:

            my($hits, $req, $names, $report) = spam_assassin_check();

And then right under that, add the extra things.

            # add our things
            $hits += $SA_score_additions;
            $names .= $SA_test_additions;

And then take whatever actions you take.

OK... the added $names are not in alphabetical order with the others.
They could be sorted if I cared.



Joseph Brennan
Academic Technologies Group, Academic Information Systems (AcIS)
Columbia University in the City of New York



More information about the MIMEDefang mailing list