[Mimedefang] Filtering Based On Results of Spamassassin

Jeffrey Thompson jeffrey at thompsonic.com
Mon Mar 3 11:30:01 EST 2003


I would like to filter based on the results of Spamassassin check
(spam_assassin_check() or spam_assassin_status()).  I'm particularly
targeting hits on PORN_4 and HOT_NASTY (to start with).  

Just looking at the MIMEDefang Filter (5) man page so far I can see that
I can call spam_assassin_check($hits, $required, $tests, $report) and
then do a regular expression scan on $report for PORN_4 or HOT_NASTY.  

Two questions:

1) Is there a better way?
2) Does it make sense to add a MIMEDefang function that returns an
associative array of SpamAssassin hits with the SpamAssassin return
codes as Keys (ie, if($spam_assassin_hit["PORN_4"] ||
$spam_assassin_hit["HOT_NASTY"]) {
   action_bounce("Porn not welcome here");
}
)

What do you kind MIMEDefanger's think?

-- 
Jeffrey Thompson <jeffrey at thompsonic.com>
Thompson Internet Communications, Inc.




More information about the MIMEDefang mailing list