You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rejaine Monteiro <re...@bhz.jamef.com.br> on 2007/08/02 17:52:49 UTC

Creating rule with .and. operator...

Hi,

How can I create a rule to match  no-spam e-mail  with  have (both) 
words "hello"  and "testing"   (body or hearder)

I tried to use:

/hello&testing/i

/hello&&testing/i

/hello && testing/i

but not working...


I need to match messages  with have hello and testing in any position, 
like:

"hello list,
I'm  testing  this e-mail!!!"

or .. "Hi and hello... testing .. and works.. "


Re: Creating rule with .and. operator...

Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Aug 02, 2007 at 12:52:49PM -0300, Rejaine Monteiro wrote:
> How can I create a rule to match  no-spam e-mail  with  have (both) 
> words "hello"  and "testing"   (body or hearder)
> 
> I tried to use:
> 
> /hello&testing/i
> /hello&&testing/i
> /hello && testing/i

These are regular expressions, not some kind of boolean thing.


First, read "perldoc perlre".

Second, use multiple rules and combine them with a meta rule.  See "perldoc
Mail::SpamAssassin::Conf" for more information.

Third, it's generally a bad idea to have rules that look for a single word
(or, if unanchored, substrings).  Let Bayes handle that stuff, unless there's
certain things you're sure won't FP and you want to block.

:)

-- 
Randomly Selected Tagline:
"BABYLON 5!  A five-mile long cement mixer of truth, pouring out the
  Concrete of Nice-Nice in a long, grey ribbon into the future, to form a
                 ***SIDE WALK OF JUSTICE!!***" - The Tick on Babylon 5