Set Up a Mail Filter Rule
From the myCP -> Email Admin menu on the left, select [User Admin] -> [List Users] or [Search Users] to display the user you wish to set up a filter for. Once you have found the right user, click on the [Mail Filter] link associated with that user and you will be taken to Add/Edit filter form. Under the Existing mail filters section, select [Add] to add a new filter. Fill in the required information and select the options applicable to your needs. These are explained as follows:
Rule Name
Type in the name of your filter. You can call it whatever you wish. If you wish to use regular expression to match text in the incoming E-mail, check the box labeled using regular expression rather than plain text.
Condition
- Header: Select this radio button if you wish to scan the header of an incoming e-mail. Use the drop down box to select a specific header field such as Subject, From, To, etc, you want the filter rule to apply to. More specifically, you can tell the rule to match from the beginning, middle, or end of the header field. Then in the next field to the right, specify your plain text or regular expression word you wish to match against the header.
- Body: If you wish to use body instead instead of Header, check this radio button. The rest of rules are the same as that described in the header section above
- Addressed to or Not addressed to: This is basically a short cut to use instead of going through the header and selecting a To field. If you do not understand how E-mail headers work, select this option instead and enter the E-mail address you wish to match against the incoming E-mail.
- Is a plain text message: Select this option if you wish to match against plain text E-mail.
- Is not a plain text message: Select this option if you wish to match against html formatted E-mail or E-mail with attachements.
- Is a multipart MIME message: Select this option if you wish to match against E-mail that contains complex message structure with more than one part, each of which has headers of its own. Examples of such E-mails are those with different languages, html, attachments, PGP signed E-mail or a digest of different E-mail etc.
- Is not a multipart MIME message: Select this option if you wish to match against E-mail that are mime encoded but not multipart.
- Message is larger than or smaller than a certain number of bytes: Select this if you wish to filter against E-mail based entirely on the size of the E-mail. This is useful if you do not expect to receive any large E-mails.
Action
This section assumes that the filter rules have successfully matched an incoming E-mail so the action will be taken on this E-mail.
- Save in:If you wish to move the E-mail to a certain folder on the server, select this option and choose the correct folder from the dropdown box. If you wish to save it to a specific folder that is not there, you will need to create it via webmail. If you save it in the Trash, it will be deleted after 7 days if not earlier depending on your specifications in webmail. If you want the E-mail to be subjected to further filtering, check the box labeled and continue filtering.
- Forward to: Instead of saving the E-mail that has matched your criteria, you may wish to forward that E-mail to another address. Select this option and enter the appropriate E-mail address to forward to. If you want the E-mail to be subjected to further filtering, check the box labeled and continue filtering.
- Reject with error: We advised against choosing this option, because a lot of spam E-mails do not have a return address or invalid return addresses. So rejecting them may waste server resources and or sending E-mail to innocent recipients (if spammers falsify return addresses). However, select this option and type in the error message here. Something like ‘Invalid Recipient’ may deter future spams.
Click [Submit] to save your changes to the rule. Then click on [Save all Changes] at the top to actually activate all the rules you have saved.
Edit a Mail Filter Rule
From the myCP -> Eail Admin menu on the left, select [User Admin] -> [List Users] or [Search Users] to display the user you wish to set up a filter for. Once you have found the right user, click on the [Mail Filter] link associated with that user and you will be taken to Add/Edit filter form. Under the Existing mail filters section, select the name of the filter you wish to edit and click on the [Edit] button. Fill in the required information and select the options applicable to your needs as explained under the Set up a Mail Filter Rule section.
Delete a Mail Filter Rule
You must delete all rules if you do not wish to scan any incoming e-mails. From the myCP -> Eail Admin menu on the left, select [User Admin] -> [List Users] or [Search Users] to display the user you wish to set up a filter for. Once you have found the right user, click on the [Mail Filter] link associated with that user and you will be taken to Add/Edit filter form. Under the Existing mail filters section, select the name of the filter you wish to delete and click on the [Delete] button. Continue deleting other filter rules. Once you are done, click on [Save all changes] for the deletion to take effect.