On Tue, 2003-10-21 at 14:26, Jason R. Mastaler wrote:
> Rick Mann <[EMAIL PROTECTED]> writes:
> 
> > First, everything goes through Bogofilter (a Bayesian analysis),
> > which adds a header to each message indicating if it thinks it's
> > spam (Yes/No) and what the spam score was (0.0 - 1.0). I have
> > spam/ham cutoff set very low (in bogofilter), so that any false
> > positives get challenged.
> >
> > I'd like to have TMDA say, "well, that spam score is above 0.7, so
> > I'm just going to drop that message, but this spam score is below
> > 0.7 and above 0.2, so I'm going to challenge it".
> 
> You can accomplish this in TMDA with some 'headers' entries.  See
> http://tmda.net/filter-sources.html. i.e,
> 
> # drop if spam score is > 0.7
> headers <regular_expression> drop
> 
> # challenge if spam score is < 0.7 && > 0.2
> headers <regular_expression> confirm
> 
> You need to fill in the <regular_expression> blanks based on the
> content of those headers that Bogofilter adds.  If you can't figure it
> out, post some examples of these headers, and someone who is good with
> regular expressions might be able to help.
> 
> Monique's suggestion is a good one though, as it'll likely make the
> regex simpler.

In case anyone is interested, here is a regex for use with SpamAssassin:

headers '^X-Spam-Level:\so{15,50}' drop

I use "o" in the Spam-Level header rather than "*". You can set this in
SpamAssassin. I suppose you would use "\*" instead of "o" if you wanted
to match asterisks. I avoid this because some mailing lists seem to have
spamassassin headers in them, and my regexps were matching on those.

This matches:
X-Spam-Level: oooooooooooooooooooooooooooo

Provided that there are between 15 and 50 "o"s. Just change the numbers
in the curly brackets to specify the range you are interested in. You
can use several rules (remembering that first match wins) to make
different behaviours for different spam levels.

Hope this helps,
Ray


_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to