Given a typical spamasssassin header:

X-Spam-Status: No, hits=2.7 required=5.0
 tests=AWL,HTML_10_20,NO_REAL_NAME
 version=2.55

I would like to see an intuitive regex (or multiple regex) that a normal
user can understand that will:
1) drop any email scoring > 32.0
2) confirm any email scoring 3.4 to 32.0
3) accept any email scoring < 3.4

Nothing that I can up with was something I could expect a normal user to
understand and/or maintain.  I think it would be a great asset to be able to
compare values numerically, even if I had to insert a special header with a
value only, say:

X-Spam-Score: 2.7

where a user could put in a couple of simple, match-first, type rules that
are easily understood:
(match header comparison action)
header-value X-Spam-Score > 30 drop
header-value X-Spam-Score >= 3.4 confirm
header-value X-Spam-Score < 3.4 accept

Preferred, of course, would be something that could parse the original
X-Spam-Status line.

Maybe some syntax like:
(match header regex-value-finder comparison action)
header-value X-Spam-Score hits=\(\d+.\d\) > 30 drop


Any idea how hard this would be to implement?

----- Original Message ----- 
From: "Jason R. Mastaler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 3:26 PM
Subject: Re: Filtering based on the numerical value of a header


> 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.
> _____________________________________________
> tmda-users mailing list ([EMAIL PROTECTED])
> http://tmda.net/lists/listinfo/tmda-users

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

Reply via email to