[Mimedefang] Block all spam from one user?

Rich West Rich.West at wesmo.com
Thu Nov 28 14:01:01 EST 2002


I'm sure this has come up before, but I couldn't find exactly what I was 
looking for in the archives.  Basically, what I am trying to do is blow 
ANYTHING that SpamAssassin (or that contains a virus) from going to one 
particular email address hosted by us.  That email address is a helpdesk 
which provides support for end users (no matter where they are).

The snippet that I have tried is below.. it is from filter_end(), and, 
unfortunately, it is not working as expected... Any ideas as to how to 
do this properly?

Thanks!
-Rich

    # Spam checks if SpamAssassin is installed
    if ($Features{"SpamAssassin"}) {
        if (-s "./INPUTMSG" < 100*1024) {
            # Only scan messages smaller than 100kB.  Larger messages
            # are extremely unlikely to be spam, and SpamAssassin is
            # dreadfully slow on very large messages.
            my($hits, $req, $names, $report) = spam_assassin_check();
            if ($hits >= $req) {
                md_log('spam', $hits, $RelayAddr);
                return action_bounce("Message Detected As SPAM - 
Delivery Denied") if ($recipient =~ /support\@MYDOMAIN.COM/i );





More information about the MIMEDefang mailing list