[Mimedefang] Foreign charset filter

Jeff Grossman jeff at stikman.com
Mon Nov 18 16:39:01 EST 2002


The following rule has been working great:

    $head = $entity->head;
    $charset = $head->mime_attr("content-type.charset");
    if (defined($charset)) {
        $charset =~ tr/A-Z/a-z/;
        if ($charset eq "ks_c_5601-1987" or
            $charset eq "euc-kr" or
            $charset eq "iso-2022-kr" or
            $charset eq "big5" or
            $charset eq "gb2312" or
            $charset eq "gb2312_charset") {
        action_notify_administrator("Foreign spam message rejected.\nFrom:
$Send
er.\nTo: @Recipients.\nSubject: $Subject");
        return action_bounce("Foreign spam not accepted. Please contact
Postmast
er for details.");
        }
    }


But, today I had my first false positive.  It was the SpamAssassin-talk
digest.  Is there anything I can add which will ignore mailings from certain
e-mail addresses?

Thanks,
Jeff
-- 
Jeff Grossman (jeff at stikman.com)




More information about the MIMEDefang mailing list