How to use email filters in cPanel (account-level and global filters)
Email filters sort, redirect or delete messages automatically as they arrive. This guide explains how to use email filters in cPanel: Email Filters for a single mailbox and Global Email Filters for all mail on your account, with practical examples such as blocking a sender, moving newsletters to a folder, and forwarding invoices to accounting.
Account-level vs global filters
- Email Filters: apply to one email address. Use these for personal rules.
- Global Email Filters: apply to all mail delivered to your cPanel account. Use these for company-wide rules, such as blocking a spam domain for everyone.
Filters run on the server, so they work no matter which device or app you use: Outlook, phone or Roundcube webmail.
Create a filter for one mailbox
- Log in to cPanel (How to log in to cPanel) and open Email Filters.
- Click Manage Filters next to the email address.
- Click Create a New Filter and give it a clear Filter Name.
- Under Rules, choose what to check (for example From, Subject, To, Body or Any Header), the condition (such as contains, equals or begins with) and the value.
- Under Actions, choose what to do, for example Deliver to Folder, Redirect to Email, Fail with Message or Discard Message.
- Click Create.
You can add several rules (with and/or) and several actions to one filter using the + buttons.
Create a global filter
- In cPanel, open Global Email Filters.
- Click Create a New Filter and follow the same steps.
- Click Create. The rule now applies to all mailboxes on the account.
Practical examples
| Goal | Rule | Action |
|---|---|---|
| Block a persistent sender | From contains spammer@example.com | Discard Message or Fail with Message |
| Keep newsletters out of the inbox | From contains newsletter | Deliver to Folder → a "Newsletters" folder |
| Send invoices to accounting | Subject contains Invoice | Redirect to Email → accounts@yourcompany.com |
| Move likely spam | Spam Status begins with Yes | Deliver to Folder → Junk |
Test before you rely on it
cPanel's filter pages include a Filter Test box. Paste a sample message with headers (for example From: someone@example.com and Subject: Invoice 123) and click Test Filter to see which action would run.
Common problems
- Filter does nothing: check spelling and whether the condition is too strict. Use contains rather than equals for addresses.
- Mail disappeared: a Discard rule may be too broad. Review all filters, including global ones.
- Filtering spam: filters help, but spam protection and correct DNS records matter more. See Why does my email go to spam?.
Frequently asked questions
Do server filters conflict with Outlook rules?
Server filters run first, when mail arrives. Outlook rules run later and only when Outlook is open. Keep important rules on the server.
Can I filter by attachment type?
Not directly by file type. You can match text in the Body or Any Header, but results vary. Ask support for anything advanced.