[Mimedefang] Adding bayes_score from Mail::SpamAssassin:EvalTests
Kelson Vibber
kelson at speed.net
Tue Dec 16 13:00:13 EST 2003
At 07:23 AM 12/16/2003, Brett Simpson wrote:
>Would it be possible to add bayes_score from SpamAssassin's
>Mail::SpamAssassin:EvalTests perl module into mimedefang? It would be nice
>to be able to run additional checks based on the BAYES score.
How about looking in $names for BAYES_xx? It's not the exact score, but
you can get it within 10%.
A simple test would be something like
($bayes_score) = ($names =~ /\bBAYES_([0-9][0-9])\b/);
Or, if you're looking specifically for messages that trigger, say, 00 or
99, you can do something like
if (index($names, 'BAYES_99') != -1) {
# Practically no chance this isn't spam, let's do something else here.
}
(This code is off the top of my head and hasn't been tested. Beware of typos!)
What I'd like is a way to get the autolearn status of each message. I had
a customized function that worked with SA 2.5x, but they changed the
internals for 2.6 so it stopped working, and I haven't gotten around to
writing a new one yet. Partly because I don't expect it to work once 2.7
arrives!
Kelson Vibber
SpeedGate Communications <www.speed.net>
More information about the MIMEDefang
mailing list