Manage Email Filters in cPanel
An email filter uses a set of rules to determine whether the system will trigger a set of actions.
You can add multiple rules to match subjects, addresses, or other parts of the message. You can then add multiple actions to take on a message such as to deliver the message to a different address and then discard it.
There are two kinds of email filters in cPanel - Global Email Filters for all email accounts on the site and Email Filters for each email account.
The system will run these rules in the exim mail server so you won't be able to access them in your remote mail client such as Outlook or Thunderbird but you can get to these filters through cPanel or webmail interface.
Access email filters through cPanel
Login cPanel > Email and click Email Filters link:
In the Email Filters interface are listed all email accounts. If you have multiple accounts use search form to find the desired account.
To create or edit the email filters for a particular account click the corresponding Manage Filters link next to email account name:
On the next screen you can create or manage email filters for your main email account:
Access email filters through webmail
You can log in webmail using direct URL
http://hostpulse-demo.com:2096 and you'll be redirectred to
Enter your username and password (for particular mail box) in the webmail login interface and click log in. Then click your username in the upper right corner of the webmail interface, select and click email filters:
The same email filters interface will appear within the webmail frame:
Create a New Email Filter
In the Filters by Users table, click Manage Filters next to the appropriate email account.
Click Create a New Filter.
Enter a name for the filter in the Filter Name text box.
Configure your filter's rules and actions by selecting an option and entering a spam word in the text box:
Using logical operators
or / and you can add new or remove an existing rule or action:
Note: For detailed information on how to configure your filter, read our How to Configure Mail Filters article.
To list an email account's filters, click Manage Filters in the row of the appropriate email account. The Current Filters table lists all of the filters for the selected email account.
Reorder a filter
You can change the priority of those filters using the arrow buttons or you can drag and drop the rules at a new position in the table:
Edit a filter
Click Edit next to the appropriate filter name to enter the
Create / Edit interface.
Make the desired changes to the filter and click Save.
Delete a filter
Click Delete next to the appropriate filter name.
Click Delete Filter to confirm:
A confirmation message will appear:
Test a filter
In the Filters by Users table, click Manage Filters next to the desired email account.
Enter a test email message in the Filter Test text box. We have included our spam words that should trigger the action:
Click Test Filter.
Filter Trace Results:
The Filter has matched the following condition(s): $header_subject: contains shopping or $message_body matches offers $header_subject: contains shopping Return-path copied from sender Sender = firstname.lastname@example.org Recipient = email@example.com Testing Exim filter file "/home/username/etc/hostpulse-demo.com/default/filter" Deliver message to: firstname.lastname@example.org Filtering set up at least one significant delivery or other action. No other deliveries will occur.
This report means that if someone sends an email to
email@example.com and the subject contains the word shopping or the body contains the word offers this email will be delivered to
firstname.lastname@example.org because of the email filter settings.
Let's check if that is true.
We send an email that contains the spam words. Now we open the receiving mail box
email@example.com but the email is not there:
Next we are checking
firstname.lastname@example.org - the email was delivered there following the filter actions (the mail source proves the delivery):
Return-Path: <email@example.com> Delivered-To: firstname.lastname@example.org Envelope-to: email@example.com
Sending spam messages is completely unethical and unacceptable practice. cPanel provides various tools for limiting spam and email filters are one of those very successful tools.
Be careful when choosing spam words as it is possible for the filters to catch not spam emails also. Always choose the email forwarding action where you can check for incorrectly filtered emails and edit the filters accordingly.
#cpanel #email #security