You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Diego Pomatta <in...@abelsonsa.com.ar> on 2007/07/30 17:50:56 UTC
Custom Rules
Hey list.
I'm new to custom rules. I've written my first one, and I was wondering
if one of the list gurus could tell me if it's correct.
Specially the regex part. Not sure since I don't know jack about Perl
regex. :)
Would the following do the trick, if what I want is for all mail
containing "greeting ecard" in the subject to add 4 points to the score?
header CONTAINS_ECARD1 Subject =~ /greeting ecard/
score CONTAINS_ECARD1 4
describe CONTAINS_ECARD1 ecard spam type 1
Also, regarding whitelist_from_rcvd, does it work with IP addresses
also, or only with domains?
Example:
whitelist_from_rcvd cpcecaba@* cponline.org.ar
whitelist_from_rcvd cpcecaba@* xxx.yyy.www.zzz <---- would this work?
Thanks!
Re: Custom Rules
Posted by Per Jessen <pe...@computer.org>.
Diego Pomatta wrote:
> I'm new to custom rules. I've written my first one, and I was
> wondering if one of the list gurus could tell me if it's correct.
> Specially the regex part. Not sure since I don't know jack about Perl
> regex. :)
Very useful site:
http://www.regular-expressions.info/
> Would the following do the trick, if what I want is for all mail
> containing "greeting ecard" in the subject to add 4 points to the
> score?
>
> header CONTAINS_ECARD1 Subject =~ /greeting ecard/
> score CONTAINS_ECARD1 4
> describe CONTAINS_ECARD1 ecard spam type 1
Yes, it'll do what you want.
/Per Jessen, Zürich