[Mimedefang] all_spam_to question

Fred Felgenhauer fred at fredf.com
Thu Jan 29 15:36:15 EST 2004


Here is my workaround. I am doing stream_by recipient and score
USER_IN_ALL_SPAM_TO set to 0 (or else
other recipients of same e-mail get message tagged as not spam)

How costly is reading the local.cf for each recipient?

sub all_spam_to () {
        $username = $Recipients[0];
        $username =~ tr/<>//d;
        $allspam = "all_spam_to $username";
        open(CF, "/etc/mail/spamassassin/local.cf");
        while(<CF>){
                if (/^$allspam/i){
                        close(CF);
                        return 1;
                }
        }
        close(CF);
        return 0;
}

filter_end

if (all_spam_to()){

md_syslog('warning',"Skipping SpamAssassin\n");

}else{

run sa checks
}



More information about the MIMEDefang mailing list