Forum Moderators: phranque

Message Too Old, No Replies

Cpanel email filter matches regex option

Filtering "drugs" but no "drugstore"

         

silverbytes

4:37 pm on May 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found a nice email filter panel in Cpanel.
The interesting feature is to discard by words found in body message (so you can filter those spams that put regular subject but spam in body)

The thing is, If I set to discard when the word "drug" is found. It will delete those containing "drugstore" or other words that include "drug" somewhere else (even with no spaces)

The list lets you filter when
contains
matches regex
begins with
equals

Is it possible to filter "drug" but no any other word containing "drug" somewhere else?
I tried all options but had no success still.

jdMorgan

5:18 pm on May 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is primarily a regular-expressions qustion, then.

\bdrug\b

would match "drug" as a stand-alone word, but not as part of a larger word, and there are several additional ways to do it as well. The opposite function would be

\Bdrug\B

which would match drug inside a larger word, but not standing alone.

Jim

silverbytes

5:49 pm on May 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tried that in Cpanel Email Filers and didn't work, the filter is expecting \bdrugs\b literally I guess.

Anybody has success on using regex in Cpanel?

silverbytes

1:42 pm on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there another way to enter the regex? The Cpanel manual doesn't help about this...