The Email Filters tool in cPanel lets you create filtering rules for individual email accounts. Unlike Global Email Filters, which apply to the whole domain, Email Filters apply only to a specific mailbox. This way you can customize the filtering settings for each user separately.
Where to find Email Filters
Log in to cPanel and go to the Email section. There you will see two main options:
-
Email Filters: for user-level filtering.
-
Global Email Filters: for rules that apply to all mailboxes of the domain.
When you select Email Filters, you will be asked to choose the specific mailbox for which you want to create or manage filters.
Creating a new filter
-
Select the mailbox from the list.
-
Click Create a New Filter.
-
Give the filter a name (Filter Name). Use descriptive names so you can recognize what it does.
-
In the Rules section, define the criteria. Examples:
-
Subject: contains or does not contain specific words.
-
From: matches or contains a sender domain.
-
To: checks the recipient.
-
Body: contains specific phrases.
-
Spam Score: checks the SpamAssassin score.
-
Any Header: filtering based on information in the email headers.
-
-
In the Actions section, define what happens when the conditions are met:
-
Discard Message: rejects the message.
-
Redirect to Email: forwards it to another address.
-
Deliver to Folder: moves it to a specific folder (e.g. Spam).
-
Pipe to Program: passes it to a script for further processing.
-
-
Click Create to save the filter.
Managing filters
On the Email Filters page you will see the list of all filters you have created for that mailbox.
-
You can edit them, change their execution order or delete them.
-
Filters run in the order in which they appear in the list, so the order matters.
-
To change priority, use the reorder buttons or drag-and-drop.
Testing filters
cPanel offers the Test Filter feature. You can enter the content of an email (headers and body) and see whether any of the filters would be triggered. This way you can verify how they work before applying them to real incoming mail.
Example of a simple filter
A filter that rejects emails whose subject contains the word “lottery”:
-
Rule: Subject contains “lottery”.
-
Action: Discard Message.
This way, that mailbox will not receive unwanted messages with this content.
Example of an advanced filter
A filter that moves to the “Invoices” folder all emails with the subject “Invoice” that come from a specific sender:
-
Rule 1: Subject contains “Invoice”.
-
Rule 2: From equals “billing@company.com”.
-
Action: Deliver to Folder → Invoices.
Best practices
-
Always test filters with Test Filter to avoid false positives.
-
Use a combination of rules for greater accuracy.
-
Avoid filters that reject on very broad criteria, so that legitimate mail is not lost.
-
Use Email Filters for personalized scenarios and Global Filters for general rules that concern all users.
Tips
At Konet we recommend combining Email Filters with the security provided by Imunify360, for complete protection from spam and malicious emails. If useful mail is accidentally lost because of a filter, you can restore specific messages or folders through JetBackup, with history of up to 3 months back.