You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Phibee Network Operation Center <no...@phibee.net> on 2008/08/29 10:20:56 UTC

Rules ?

Hi

if i want not use From: or Subject for my rules but another
choice into the header

Sample:

List-Id: <mailinglisttest.domaine.fr>
List-Unsubscribe:


header CHOICE_1          List-Id =~ /mailinglisttest.domaine.fr/
score CHOICE_1           -2.5

header CHOICE_2          List-Unsubscribe =~ /domaine.fr/
score CHOICE_2           -2.5


it's correct ?

thanks
Jerome


Re: Rules ?

Posted by Per Jessen <pe...@computer.org>.
Phibee Network Operation Center wrote:

> Hi
> 
> if i want not use From: or Subject for my rules but another
> choice into the header
> 
> Sample:
> 
> List-Id: <mailinglisttest.domaine.fr>
> List-Unsubscribe:
> 
> 
> header CHOICE_1          List-Id =~ /mailinglisttest.domaine.fr/
> score CHOICE_1           -2.5
> 
> header CHOICE_2          List-Unsubscribe =~ /domaine.fr/
> score CHOICE_2           -2.5
> 
> it's correct ?

Yes, although you should really escape the '.'s unless you intend for
them to mean <any character>.


/Per Jessen, Zürich


Re: Rules ?

Posted by mouss <mo...@netoyen.net>.
Phibee Network Operation Center wrote:
> Hi
> 
> if i want not use From: or Subject for my rules but another
> choice into the header
> 
> Sample:
> 
> List-Id: <mailinglisttest.domaine.fr>
> List-Unsubscribe:
> 
> 
> header CHOICE_1          List-Id =~ /mailinglisttest.domaine.fr/
> score CHOICE_1           -2.5
> 
> header CHOICE_2          List-Unsubscribe =~ /domaine.fr/
> score CHOICE_2           -2.5
> 
> 
> it's correct ?


fix the regex. for example, the CHOICE_2 rule will match
	FOOdomainXfrBAR
which is probably not what you want.


you can test rules by adding them with a small score (0.1 or 0.01) and 
running spamassassin -t on crafted messages.


All that said, to whitelist mailing-lists, use whitelist_from_rcvd. A 
List-* header is easily forged.