Home > Help Center > Shared Hosting > Email > Manage Global Email Filters in cPanel

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:

cpanel global email filters

Create Filter

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:

cpanel global email filters

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:

cpanel global email filters

Configure filter's rules

The rules section consists of two sets of options:

  • select the part of the email message: cpanel global email filters

  • select the type of comparison parameter: cpanel global email filters

  • Using logical operators or / and you can add new or remove an existing rule or action: cpanel global email filters

Configure filter's actions

If an email message matches your filter cPanel will handle that message following the actions that you specify:

cpanel global email filters

Again you can use multiple actions clicking + / - to add / remove actions:

cpanel global email filters

Note: For more information, read our How to Configure Mail Filters article.

Click Create.

Current Filters

The Current Filters section lists all of the account-level filters for your cPanel account:

cpanel global email filters

You can reorder the filters list by draging'n'dropping:

cpanel global email filters

or by using the arrow buttons:

cpanel global email filters

Edit a filter

Click Edit next to the appropriate filter name. Make the desired changes to the filter.

Click Create.

Delete a filter

Click Delete next to the appropriate filter name:

cpanel global email filters

Click Delete Filter:

cpanel global email filters

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:

cpanel global email filters

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      = hproot@hostpulse-demo.net
Recipient   = hproot@hostpulse-demo.net
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.

Conclusion

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.

#cpanel #security

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support