cPanel Global Email Filters - A detailed guide to creating and managing filters

The Global Email Filters tool in cPanel lets you create filtering rules that apply to all email accounts of a domain. It is the central place to reject, forward or sort messages based on predefined criteria. Unlike User-Level Filters, Global Filters affect every mailbox on the domain.


Where to find Global Email Filters

Log in to cPanel and go to the Email section. There you will see two options: Email Filters (for individual accounts) and Global Email Filters (for the whole domain). Selecting Global Email Filters takes you to the page where you can create, edit or delete filters.


Differences between Global and User-Level Filters

  • Global Filters: apply to all email accounts of the domain. A filter that rejects emails with a specific subject will apply to every account.

  • User-Level Filters: are created for a specific mailbox and affect only that user's messages.
    Using them together lets you have basic rules for the whole domain and more detailed settings per user.


Creating a new Global Filter

  1. On the Global Email Filters page, select Create a New Filter.

  2. Give the filter a name (Filter Name). A descriptive name is recommended, e.g. Block Suspicious Attachments.

  3. In the Rules section, define the criteria. Examples:

    • Subject: contains a specific word (e.g. “lottery”).

    • From: contains a specific sender domain.

    • To: contains a specific recipient.

    • Spam Status or Spam Score: detection of unwanted mail based on SpamAssassin.

    • Body: contains keywords.

    • Any Header: custom checks on email header lines.

  4. In the Actions section, set the action to take when the criteria are met. Common options:

    • Discard Message: rejects the message.

    • Redirect to Email: forwards it to another address.

    • Deliver to Folder: moves it to a specific IMAP folder.

    • Pipe to Program: sends it to a script for automated processing.

  5. Save the filter.


Advanced rules

You can combine multiple rules in a single filter. Rules can be joined with logical operators:

  • Match All of the following rules (AND)

  • Match Any of the following rules (OR)

Example:

  • Rule 1: Subject contains "invoice"

  • Rule 2: From does not contain "trusted-partner.com"
    Action: Redirect to spam@domain.gr
    This way, any email with the subject invoice but from an unknown sender will be redirected to a spam folder.


Managing and ordering filters

Filters run in the order in which they appear in the list. You can change the execution order with drag-and-drop or with the reorder buttons. You can also edit the criteria or delete filters you no longer need.


Checking and testing filters

cPanel offers a Test Filter option. Enter the content of an email (headers and body) and the system will show you whether any of the filters would be triggered, and which one. This feature is very useful to make sure your rules work as intended and do not accidentally reject legitimate mail.


Best practices

  • Use descriptive filter names so you immediately know what each one does.

  • Start with mild actions (e.g. moving to a spam folder) instead of rejecting outright.

  • Use Spam Score filters together with Imunify360 for stronger protection.

  • Test filters with Test Filter before applying them in a production environment.

  • Check the delivery logs (Track Delivery) regularly to make sure the filters work correctly.


Tips

At Konet you can combine Global Filters with the strong protection of Imunify360, giving you a double layer of security against malicious emails and phishing. Also, if useful mail is ever deleted by a filter, you can use JetBackup to restore messages from up to 3 months back.

Was this article helpful?

Related service Konet Web Hosting cPanel, LiteSpeed and automatic backups on every plan.

Related articles