You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Robert Fitzpatrick <li...@webtent.net> on 2008/02/01 03:07:52 UTC
Creating meta rule
Looking at my stats I see those hitting LONGWORDS and scoring BAYES_50
or higher are all big time spam that have been hard to catch, see my
posts earlier this week 'bayes and celeb spam'. Would it be a bad idea
to add to the score when both hit? It looks like a score of 3.5 will be
needed for the effect to work as some of these still score below 2.0.
I've created a meta rule to add rules together, would I do the same like
this? I've used && to put rules together, can || be used as 'OR'?
meta NEW_RULE (LONGWORDS && (BAYES_50 || BAYES_60 || BAYES_80 || BAYES_95 || BAYES_99)
describe NEW_RULE My new rule
score NEW_RULE 3.5
Thanks for any feedback!
--
Robert
Re: Creating meta rule
Posted by Matt Kettler <mk...@verizon.net>.
Robert Fitzpatrick wrote:
> Looking at my stats I see those hitting LONGWORDS and scoring BAYES_50
> or higher are all big time spam that have been hard to catch, see my
> posts earlier this week 'bayes and celeb spam'. Would it be a bad idea
> to add to the score when both hit? It looks like a score of 3.5 will be
> needed for the effect to work as some of these still score below 2.0.
> I've created a meta rule to add rules together, would I do the same like
> this? I've used && to put rules together, can || be used as 'OR'?
>
> meta NEW_RULE (LONGWORDS && (BAYES_50 || BAYES_60 || BAYES_80 || BAYES_95 || BAYES_99)
> describe NEW_RULE My new rule
> score NEW_RULE 3.5
That should work as you expect... There are plenty of examples of
similar usage in the standard ruleset, such as:
20_meta_tests.cf:
meta INVALID_MSGID __HAS_MSGID && !(__SANE_MSGID ||
__MSGID_COMMENT)
Just be careful with your use of boolean not (!) around groupings like
that.. It's amazingly common for people to make the error of ignoring
DeMorgan's Theorem..
ie: !( a || b) is not equal to (!a || !b) but it's a common mistake to
think they are.