Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

meta rules assistance

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


thomas.kinghorn at gmail

Apr 10, 2012, 2:14 AM

Post #1 of 4 (316 views)
Permalink
meta rules assistance

Morning list

I was wondering if it is possible to achieve the following:

  1. create a meta rule to match 2 items.
  2. assign a score to the test
  3. BUT if a 3rd item is matched, ignore the first score and assign the higher score



EG:


RULE 1


body __PRIVACY_POLICY /Privacy Policy/
body __DEAR_CUSTOMER /(Dear Customer|Dear Valued Customer)/i
meta BODY_RULE (__PRIVACY_POLICY && __DEAR_CUSTOMER)
score BODY_RULE 0.01





THEN



RULE 2


header __HEADER_PVT_1 Received=~ /from \[192\.168\.[0-9]{1,3}\.[0-9]{1,3}\] \(unknown /

meta HDR_AND_BODY (BODY_RULE && __HEADER_PVT_1)
score HDR_AND_BODY 0.25




SO THAT
if the 1st 2 conditions are met, then score 0.01 (RULE 1) BUT if the 3 conditions are met, then score 0.25 (RULE 2) AND NOT 0.01 (RULE 1)


Is this possible?



thanks
Tom


swatir88 at gmail

Apr 10, 2012, 2:56 AM

Post #2 of 4 (302 views)
Permalink
Re: meta rules assistance [In reply to]

I don't think you can ignore any rule. So I want to suggest workaround : If
both rules will be applied, final score will be 0.26 (RULE 1 + RULE 2). If
you don't want the score 0.26, you should change the score of RULE 2 to
0.24 so that your final score will remain 0.25.

-Swati R

On Tue, Apr 10, 2012 at 2:44 PM, Tom Kinghorn <thomas.kinghorn [at] gmail>wrote:

> Morning list
>
> I was wondering if it is possible to achieve the following:
>
>
> 1. create a meta rule to match 2 items.
> 2. assign a score to the test
> 3. BUT if a 3rd item is matched, ignore the first score and assign the
> higher score
>
>
> EG:
>
> *RULE 1*
>
> body __PRIVACY_POLICY /Privacy Policy/
> body __DEAR_CUSTOMER /(Dear Customer|Dear Valued Customer)/i
> meta BODY_RULE (__PRIVACY_POLICY && __DEAR_CUSTOMER)
> score BODY_RULE 0.01
>
>
> THEN
>
> *RULE 2*
>
> header __HEADER_PVT_1 Received=~ /from
> \[192\.168\.[0-9]{1,3}\.[0-9]{1,3}\] \(unknown /
>
> meta HDR_AND_BODY (BODY_RULE && __HEADER_PVT_1)
> score HDR_AND_BODY 0.25
>
>
> SO THAT
> if the 1st 2 conditions are met, then score 0.01 (RULE 1) BUT if the 3
> conditions are met, then score 0.25 (RULE 2) AND NOT 0.01 (RULE 1)
>
> Is this possible?
>
> thanks
> Tom
>
>
>


rwmaillists at googlemail

Apr 10, 2012, 5:17 AM

Post #3 of 4 (303 views)
Permalink
Re: meta rules assistance [In reply to]

On Tue, 10 Apr 2012 11:14:19 +0200
Tom Kinghorn wrote:

> Morning list
>
> I was wondering if it is possible to achieve the following:
>
> create a meta rule to match 2 items.
> assign a score to the test
> BUT if a 3rd item is matched, ignore the first score and assign the
> higher score

Just make the lower scoring rule conditional on the higher-scoring rule
not being hit.

meta HIGH A && B && C

meta LOW A && B && ! HIGH


me at junc

Apr 10, 2012, 5:23 AM

Post #4 of 4 (304 views)
Permalink
Re: meta rules assistance [In reply to]

Den 2012-04-10 11:14, Tom Kinghorn skrev:

> if the 1st 2 conditions are met, then score 0.01 (RULE 1) BUT if the
> 3 conditions are met, then score 0.25 (RULE 2) AND NOT 0.01 (RULE 1)
>
> Is this possible?

add "&& !__HEADER_PVT_1" to meta BODY_RULE

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.