[Mimedefang] Suppressing postmaster notify on MX backup

Kenneth Porter shiva at sewingwitch.com
Mon Jun 16 20:32:02 EDT 2003


I've got MD rejecting spam with score above 10 on my primary MX, but now I'm
getting a double bounced "postmaster notify" on the secondary MX, because the
bounced mail is bouncing off a forged source. Alas, I can't impose the same
bounce policy on the secondary as it's the primary for another domain that for
the present needs to accept all mail.

What do you recommend to get rid of the notifications on the secondary?

Perhaps check that the relay is not my secondary and queue the bounce if it
is, instead? How would I code that?

An extract from my filter follows:

    # 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();
            # standard filter attaches report here. We do another
            # SA pass at delivery so just bounce the egregious stuff here
            if ($hits > 10) {
                md_log('spam', $hits, $RelayAddr);
                action_bounce("Message seems to be spam, rejected");
            }
        }
    }




More information about the MIMEDefang mailing list