Email filters in cPanel automatically sort, redirect, or discard incoming mail based on rules you define. cPanel offers two levels: filters for a single mailbox, and global filters that apply to every address on the domain. This guide explains the difference and how to create, test, and remove filters.
About cPanel email filters
cPanel has two filter tools in the Email section:
- Email Filters — rules for one specific mailbox. The mailbox owner can manage these.
- Global Email Filters — rules that apply to every email address on the domain. These need account-level (cPanel) access.
Each filter is a set of rules (conditions to match) plus actions (what to do with matching mail). Common uses are filing newsletters into a folder, redirecting certain senders, or discarding obvious junk.
Before you begin
- Access to cPanel for your hosting plan. See Adding a New Email Account in cPanel for how to reach cPanel.
- A clear rule in mind. Know which messages you want to match (by sender, subject, etc.) and what should happen to them.
Step 1: Open the right filter tool
- Sign in to the Exact Hosting portal and open cPanel.
- In the Email section, click Email Filters (for one mailbox) or Global Email Filters (for the whole domain).
- For Email Filters, click Manage Filters next to the mailbox you want.
Step 2: Create a filter
- Click Create a New Filter.
- In Filter Name, enter a descriptive name.
- Under Rules, build your condition:
- Choose the part of the message to test (From, Subject, To, Any Header, Body, etc.).
- Choose the comparison (contains, is, matches regex, begins with, etc.).
- Enter the value to match.
- To match on more than one condition, click + and choose and or or.
- Under Actions, choose what to do with matching mail:
- Deliver to folder — file it into a mailbox folder.
- Redirect to email — send it on to another address.
- Discard Message — silently delete it.
- Fail With Message — bounce it back with a notice.
- Other actions include stopping further filters or piping to a program.
- Click Create (or Activate).
Tip: Order matters. cPanel runs filters top to bottom. If an early filter discards a message, later filters never see it. Use the Move Up / Move Down controls to set the order.
Step 3: Test the filter
cPanel includes a built-in tester:
- On the Email Filters page, find the Filter Test area.
- Paste a sample message (including headers if your rule checks them).
- Run the test to see whether your filter matches and what action it would take.
You can also send a real test message that should match the rule and confirm it lands where you expect.
Removing or editing a filter
- Return to Email Filters (or Global Email Filters).
- Find the filter in the list.
- Click Edit to change it, or Delete to remove it.
Warning: A filter with a Discard action deletes matching mail permanently, with no copy kept. Test discard rules carefully before relying on them.
Filters vs. SpamAssassin
Filters are for your rules about specific senders or subjects. For automated spam scoring across all your mail, use SpamAssassin instead — see Managing Apache SpamAssassin in cPanel.
Next steps
- Set a catch-all. Decide what happens to mail for addresses that do not exist in Creating a Catch-All (Default) Address in cPanel.
- Reduce spam automatically. See Managing Apache SpamAssassin in cPanel.
Questions? Contact Exact Hosting Support.
How helpful was this article?
Thanks for your feedback!
Do you still need help? If so please submit a request here.