[Mimedefang] MD 2.30 having probs with SpamAssassin 2.50

Fox, Randy Randy_Fox at csgsystems.com
Wed Mar 12 12:23:01 EST 2003


> -----Original Message-----
> From: Paul [mailto:freebsd at pksnet.com]
> Sent: Wednesday, March 12, 2003 10:30 AM
> To: MIMEDefang at lists.roaringpenguin.com
> Subject: [Mimedefang] MD 2.30 having probs with SpamAssassin 2.50
> Importance: High
> 
> 
> I've looked at it from all different angles but can't seem to 
> get it to work like I want to.
> 
> What I want is for the MD/SA Combo to bounce all mails SA 
> rates 12 or higher and not stick on the SA report. I changed 
> /etc/mail/mimedefang.cf accordingly based on the How-To page. 
> But still, although flagged with an SA attachment and the 
> ***** in the header, they get thru to the user.

If you want to reject the message without the X-Spam-Report header, I would think you'll need to do that instead of adding the header.  This is untested, but I believe it would look something like the following.

Randy


my($hits, $req, $names, $report) = spam_assassin_check();
if ($hits >= $req)
{
    md_log('spam', $hits, $RelayAddr);
    my($score);
    if ($hits > 12)
    {
        action_quarantine_entire_message();
        action_bounce("Message seems to be spam, rejected");
    }
    else
    {
       if ($hits <= 12)
       {
          $score = "*" x int($hits);
       }
       else
       {
          $score = "*" x 12;
       }
       # We add a header which looks like this:
       # X-Spam-Score: 6.8 (******) NAME_OF_TEST,NAME_OF_TEST
       # The number of asterisks in parens is the integer part
       # of the spam score clamped to a maximum of 40.
       # MUA filters can easily be written to trigger on a
       # minimum number of asterisks...
       action_change_header("X-Spam-Score", "($score) $hits $names");
       action_add_header("X-Spam-Status", "Yes, hits=$hits required=$req");
       action_add_header("X-Spam-Report","$report");
    }
}




More information about the MIMEDefang mailing list