Setting Up Email Spam Filtering
NOTE: ImageAid.net now provides advanced spam filtering options for all of it's clients that does not depend on content based filters such as these. If you'd like to take advantage of this, please contact support@imageaid.net and ask to sign up for the NoSpamWeb service .
1. Login to the webmail account you would like to setup a filter for (if you'd like the filter to work on all accounts in a certain domain, then login as root@domain.xyz <mailto:root@domain.xyz> <mailto:root@domain.xyz> ) If you are working with filters for a specific user, then click on "Filters"; if you're working on filters for the entire domain while logged in as the root user, click on "Domain Filters"

2. A new screen will appear showing all the current filters for this account or domain. From here, you can either add more or modify/delete the current ones. You can also change the order in which filters are processed here by clicking on the "Up" or "Down" buttons at the right . Click on ADD.

3. Use the drop-down Select Field box, choose what you'd like to filter based on (Subject, To, From, Header, Sender, Body), then select contains or doesn't contain, and then enter a search phrase. Click Add Condition to add the search phrase.

Hints on search phrase
4. Multiple keywords or phrases can be included in one string. To do this, use the following format within the Phrase field:
(keyword1 | keyword2 | keyword3)
In other words, the entire string must be enclosed by parenthesis ( ) and each word is separated by a pipe | key.
(the pipe key is the straight line located above the backslash \ key next to the backspace button on your keyboard)
5. The other way to separate multiple keywords is by using the INSERT AND or INSERT OR buttons found on the Edit Rule page.
6. The expressions for each element of a delivery rule follow:
Message Area
From: F
Subject: S
Sender: N
To: T
entire header (everything preceding the body) H
entire body of message B
Condition Expression
contains ~
does not contain !~
equals =
does not equal !=
Text Pattern Expression
Any character .
Any of the values separated by vertical bars within the parentheses; the
vertical bar represents "or" (this|that|other)
Any word character (a-z, A-Z, 0-9) \w
Any non-word character \W
Any digit (0-9) \d
Any non-digit \D
Any white space (spaces and/or tabs and/or carriage returns) \s
Any non-white space \S
Any punctuation character (any character other than \w or \s) \p
Any non-punctuation character \P
Quantifier Expression
Zero or more *
One or more +
Exactly 100 {100}
At least n1, but not more than n2 (where n1 and n2 are numbers) {n1,n2}
Note: As shown above, the following characters have special meaning in a rule: {}()|*+,.:\ If you want to use one of these characters in a search string, precede it with a backslash. For example, to search for a plus sign, enter \+ in the search string.
Note that only the first 32,000 bytes of a message is checked. Please see the bottom of this page:
7. Those look complicated, but essentially it allows you to setup some complex filters. One of the most important ones to note is that whitespace is ignored. This means that the following filter won't work:
(get rich quick scheme)
because it will search the message for the following text:
getrichquickscheme
which probably doesn't exist. In order to setup the filter properly, you'd want to do it like this:
(get\srich\sqiuck\sscheme) or (get \s rich \s quick \s scheme)
The reason: since whitespace is ignored in Imail we can space things out to make them clearer.
Note: As shown above, the following characters have special meaning in a rule: {}()|*+,.:\ If you want to use one of these characters in a search string, precede it with a backslash. For example, to search for a plus sign, enter \+ in the search string.
So, if you want to filter everything from the domain sina.yahoo.cn, the filter would look something like this:
sina\.yahoo\.cn
Reason: the dot (.) is a special character, so you must precede it with a slash (\).

8. Finally, in order to determine where a message is delivered to, you have to set a filter action.
The following actions are available: move message to mailbox, send with copy to, bounce, delete, and forward.
Move to Mailbox: Select this to move the message to a mailbox, then in the Address text box, enter the name of the mailbox to which messages meeting the rule criteria will be sent. If you enter a mailbox that doesn’t exist, one will be created. A POP3 user will see this mailbox only if he logs on to this mailbox using the format userid-mailbox. By default, if nothing is entered into the text box, messages meeting the rule criteria will be sent to the user's Main mailbox. For example, if you enter SPAM, the message will be delivered to a subfolder of the account called SPAM.
- Forward: Select this to forward the message to another address, and in the Address text box, enter the e-mail address to which messages meeting the rule criteria will be sent. You must enter the full e-mail address, such as Fred@domain1.com.
- Delete: Select this to delete the message.
- Send with Copy to: Select this to deliver the message to its intended recipient as well as copy it to an additional address that you specify in the Address text box.
- Bounce: Select this to send the message back to the sender without being processed.
Click Apply to save the rule, and you're finished! |