spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gregorie <mar...@gregorie.org>
Subject Re: Separate rule per Domain
Date Fri, 18 Sep 2009 20:38:45 GMT
On Fri, 2009-09-18 at 16:59 -0300, Eduardo JĂșnior wrote:
>
> Is it possible create custom rules to are checked only to
> specific domains?
> 
Yes.

> If yes, where I can find documentation and references about that?
> 
Use a meta-rule, something like this:

describe DOMAINS        Domains with specific rules
header   DOMAINS        From =~ /(example1\.com|example2\.org)/
score    DOMAINS        0.01

describe SPECIFIC_RULE  Rule that only applies to senders in DOMAINS
body     __SR1          /text that's only spam if its from DOMAINS/
meta     SPECIFIC_RULE  ( __SR1 && DOMAINS )
score    SPECIFIC_RULE  2.5

Of course, you can extend DOMAINS or use several of them. The specific
rules can be restricted with one or more domain selection rules: these
have a very low score so they can't cause a message to be marked as spam
by themselves. __SR1 starts with __ so it doesn't add to the score by
itself.
 

Martin



Mime
View raw message