-----Original Message-----
From: Craig McLean [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 15, 2006 12:16 PM
To: Jean-Paul Natola
Cc: users@spamassassin.apache.org
Subject: Re: RULE using %

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jean-Paul Natola wrote:
> Hi all
> 
> These homeowner  spasm are still getting through ( a lot less though since
> adding the KAM_GEO_STRING2 rule.
> 
> I do NOT know how to write rules, but I have an idea that perhaps can
reduce
> the homeowner / credit spams.
> 
> It would be something along the lines of;
> 
> If message contains the % symbol  score it .2
> If message contains the % 2 times score it .5
> If Message contains the % 3 or more times score it 1.5
[snip]

Just a quick note of caution, It's a bad idea to match on multiple
occurrences of single characters (like %). Off the top of my head, I can
think of a half-dozen opt-in newsletters which I get that offer
discounts ( "10% discount", " saving of 17%",  "get 20% off" etc.) and
would easily contain a dozen "%" characters.
If you are going to match, try doing it with patterns, like (off the top
of my head, and untested!)

/(?:£\$}\s?\d+(?:[\.,]\d+)?.{1,20}\d.{1,10}%/

might attempt to match:

"$250,000 loan at 6.35%"
"£ 10000 for you just 6%!"


C.

- --
Craig McLean            http://fukka.co.uk
[EMAIL PROTECTED]       Where the fun never starts

well that is why I would only score it like a total of 1.5 points, that
combined with the other KAM_GEO rule,  would then take it over the 5.5
threshold, the 1.5 points on its own would not discard the message

Reply via email to