Chris Santerre wrote:
> From: sergio [mailto:[EMAIL PROTECTED]
> > 
> > Hello spamassasin_list,
> > 
> >   I want filter messages with some bad words. How can configure yhe
> >   SA   to do that? Thanks.
> 
> Its not really meant to do it, but you can. You first right a rule to
> match bad words in the subject or body. But two ways to do things after
> that...  
> 
> header BAD_WORDS Subject =~ /bush/i
> description BAD_WORDS Oh...he is bad!
> score BAD_WORDS 100.00

If you are going to try this, you will definately want to check word
boundaries like this:

header BAD_WORDS Subject =~ /\bbadword\b/i

The "\b" on either side will ensure that you don't match the string as part
of another word.  (Anyone been to Essex? :)

> scoring it high will have it marked as spam, and treated however you treat
> spam. But if you wanted to to put ones that hit this rule somewhere else,
> then you could score it low and use procmail to look for the "BAD_WORDS"
> in the report header, and forward the email to another folder or account. 
>
> All this said.... I do NOT recommend doing any of this. Its sure to FP on
> emails.    

These words do not actually appear much in spam.  You may be able to filter
out mail from obnoxious clients with this approach.  These types of words
are used more often in casual emails than in spam.  "Enhancement" spams may
have some of these words, but they tend to obfuscate them so that a simple
check like this doesn't work.

Give it a try, but score it low and watch it carefully at first.

-- 
Bowie

Reply via email to