[Mimedefang] MDF / SA whitelisting not working

Nigel Allen dna at edrs.com.au
Tue Oct 14 17:58:23 EDT 2008


Relatively new to MDF and SA.

We have the following code in filter-end:

    # Spam checks if SpamAssassin is installed
    if ($Features{"SpamAssassin"}) {
        if (-s "./INPUTMSG" < 128*1024) {
            my($hits, $req, $names, $report) = spam_assassin_check();
            if ($report =~ 
/URIBL_(SC|WS|AB|JP|OB)_SURBL.+\n\s+\[URIs:\s(.+)]/) {
                my $rbl = $1;
                my $uri = $2;
                return action_bounce("This message contains a URL 
referring to a domain ($2) that is listed on the $rbl URI RBL, and will 
not be accepted by this system.  If you feel you have received this 
message in error, please notify postmaster\@edrs.com.au");
            if ($hits < 40) {
                $score = "*" x int($hits);
            } else {
                $score = "*" x 40;
            if ($hits >= $req) {
                action_change_header("X-Spam-Score", "$hits ($score) 
                action_change_header('Subject', "{SPAM?} $Subject");
                md_graphdefang_log('spam', $hits, $RelayAddr);

                # If you find the SA report useful, add it, I guess...
                action_add_part($entity, "text/plain", "-suggest",
                                "SpamAssassinReport.txt", "inline");
            } else {
                # Delete any existing X-Spam-Score header?

Even when I add rules to spamassassin's local.cf to whitelist our 
domains, I still get the "This message......" popping up whenever I send 
a message containing a URL appearing on one of the RBL blacklists.

Am I doing something wrong or am I missing something? Any suggestions 
where to start?



More information about the MIMEDefang mailing list