[Mimedefang] mimedefang not rejecting

Tony tonj at freeuk.com
Wed Mar 17 06:36:16 EDT 2010


hardware = raq550 running on strongbolt2 (Centos 4,8)
mimedefang version: 2.67-1.el4.rf (from rpmforge)
spamassassin version: 3.2.5-1.el4.rf   (from rpmforge)
mta = sendmail

I'm trying to get mimedefang to reject spam email at smtp but its not 
working.  My sendmailmc file contains the line:
INPUT_MAIL_FILTER(`mimedefang', 
`S=unix:/var/spool/MIMEDefang/mimedefang.sock, T=S:5m;R:5m'
so md should be processing mail but there's no evidence of that in the 
email headers.
Spamassassin is labelling spam correctly, a typical spam email has this 
in the header:
----------
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on home.svr5
X-Spam-Level: ********
X-Spam-Status: Yes, score=8.1 required=5.0 ...<snip>
-------------

this is the full content of my mimedfenag-filter:
----------------
# Detect and load Perl modules
detect_and_load_perl_modules();

sub filter_end {
    my($entity) = @_;
    my($hits, $req, $names, $report) = spam_assassin_check();
    my $stars = ($hits < 15) ? ("*" x int($hits)) : ("*" x 15);

    # Bounce anything hitting the spam threshold
    if ($hits >= 5) {
        action_bounce("No spam wanted here.");
        return;
    }

    # Add spam-score header
    action_change_header("X-Spam-Score", "$hits ($stars) $names");
    }
# DO NOT delete the next line, or Perl will complain.
1;
--------------

I know md can do other filtering as well but I stripped that all out as 
I'm not interested in it, all I want is spam rejected at smtp. Thanks 
for any help. 




More information about the MIMEDefang mailing list