Manage Global Email Filters in cPanel
Email filters use the criteria that you specify to determine how to handle email messages. The Global Email Filters affect the cPanel account's all email addresses.
To enter Global Email Filters interface go to cPanel > Email and click Global Email Filters link:
Important: We strongly recommend that you use multiple, simple filters instead of a single large filter. Exim, the server's mail transfer agent, handles many small rules more efficiently than it handles one large rule.
Click Create a New Filter:
Enter the filter's name in the Filter Name text box. The filter name must be unique. If you give the filter the same name as another filter, the previous filter will be overwritten:
Configure filter's rules
The rules section consists of two sets of options:
select the part of the email message:
select the type of comparison parameter:
Using logical operators or / and you can add new or remove an existing rule or action:
Configure filter's actions
If an email message matches your filter cPanel will handle that message following the actions that you specify:
Again you can use multiple actions clicking
+ / - to
add / remove actions:
Note: For more information, read our How to Configure Mail Filters article.
The Current Filters section lists all of the account-level filters for your cPanel account:
You can reorder the filters list by draging'n'dropping:
or by using the arrow buttons:
Edit a filter
Click Edit next to the appropriate filter name. Make the desired changes to the filter.
Delete a filter
Click Delete next to the appropriate filter name:
Click Delete Filter:
Test a filter
To test your filter, perform the following steps:
Enter a test email message in the Filter Test text box. Make certain that your test message includes the spam words included in the email filter:
Click Test Filter.
The Filter Trace Results text box indicates whether your filters alter the test message's delivery:
The Filter has matched the following condition(s): $header_subject: contains spam-keyword Return-path copied from sender Sender = email@example.com Recipient = firstname.lastname@example.org Testing Exim filter file "/etc/vfilters/hostpulse-demo.net" Save message to: /dev/null 0660 Filtering set up at least one significant delivery or other action. No other deliveries will occur.
Save message to: /dev/null 0660 means the message is deleted according to the selected option in actions section - Discard Message.
We recommend not to delete spam messages but to select Redirect to Email option in Actions. Doing this you can review the spam messages and fine tune the email filter to catch less not-spam messages.