You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by Apache Wiki <wi...@apache.org> on 2006/11/14 18:43:38 UTC
[Spamassassin Wiki] Update of "WritingRules" by Suso
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.
The following page has been changed by Suso:
http://wiki.apache.org/spamassassin/WritingRules
The comment on the change is:
Added slash before @ in example because otherwise perl tries to interpret it.
------------------------------------------------------------------------------
are true at the same time.The following example uses a boolean check and will add a negative
score to emails from news@example.com containing the body text "Monthly Sales Figures"
{{{
- header __LOCAL_FROM_NEWS From =~ /news@example\.com/i
+ header __LOCAL_FROM_NEWS From =~ /news\@example\.com/i
body __LOCAL_SALES_FIGURES /\bMonthly Sales Figures\b/
meta LOCAL_NEWS_SALES_FIGURES (__LOCAL_FROM_NEWS && __LOCAL_SALES_FIGURES)
score LOCAL_NEWS_SALES_FIGURES -1.0
}}}
Note that the two sub rules start with a double underscore, so they are run and treated as having
no score, as per item 3 in section 2.4.
+
+ Also note the slash placed before the @ sign. This is important otherwise perl will try to interpret it as an array.
Meta rules can also be arithmetic, but this feature was absent from the original
implementation of meta rules in 2.4x. An arithmetic meta rule can be used to tell if more