spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam D. Lopresto" <>
Subject Re: I need to write a rule with a 'greater than or equal to' evaluati on.
Date Tue, 02 Mar 2004 18:49:21 GMT
On Mon, 1 Mar 2004 wrote:

> I've been using Messagewall for a while now, and I decided to throw
> SpamAssassin into the mix.  Messagewall is great, but it's not dynamic
> enough.
> Problem is that I eventually want messagewall to tag messages only, then
> pass them on to SA.
> Messagewall always adds the header "X-MessageWall-Score: <score>
> (<host.domain.tld>)".  I want to write a rule for SpamAssassin that
> basically says, "if <score> is greater than or equal to 15, then it's a
> match."  Note that <score> can be more than two digits.
> This is how far I've gotten in
> header MW_SPAM X-MessageWall-Score: =~ /^[>=15].*/
> score MW_SPAM 1.00

There's no direct way to do that.  The regexp syntax is for text matching, not

But you can cheat a little.

header MW_SPAM X-MessageWall-Score: =~ /^(?:1(?:[5-9]|\d\d)|[2-9]\d)/

should do it.  (Untested).

> Something's wrong with the expression syntax, and I know nothing of perl so
> I haven't been able to figure it out.
> Anybody know how to do this sorta thing?
> TIA,
> Nate

Adam Lopresto

If you can spend a perfectly useless afternoon in a perfectly useless
manner, you have learned how to live. -Lin Yutang

View raw message