LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   spamassassin header rules (https://www.linuxquestions.org/questions/linux-software-2/spamassassin-header-rules-291194/)

freebie 02-16-2005 09:29 PM

spamassassin header rules
 
Hi,
I added some header rules to my spamassassin configuration file, such as the following:

header test1 Subject =~ /viagra/i
score test1 3.0

Then restarted spamassassin.
The next day, I was still receiving emails with subjects containing the work viagra. Do I need to add extra regular expression characters to this?
In order words, will what I specified match a subject of:
"buy viagra at very low rates"

or do I need something like /[^(viagra)]+viagra[.]+/i

Thanks for any thoughts or suggestions

Jeff

AltF4 02-17-2005 08:32 PM

your test looks fine to me, the onyl problem might be your (low) score of 3.0
if your REALLY want to avoid viagra in the subject i suggest:

header _LOCAL_I_HATE_VIAGRA1 Subject =~ /V.?[i1].?[a\@].?g.?[\@a]?.?r.?[\@a]/i
score _LOCAL_I_HATE_VIAGRA2 25.0

or

header _LOCAL_I_HATE_VIAGRA2 Subject =~ /\bviagra\b/i
score _LOCAL_I_HATE_VIAGRA2 25.0


All times are GMT -5. The time now is 11:33 PM.