Global email filters apply to mail arriving at every address on your hosting account, so you only need to set a rule up once. They're useful for blocking a persistent sender across all your mailboxes, or for handling a type of message the same way everywhere. To filter just one mailbox, see email filters for an email account.
Create a global filter
- Log in to cPanel and go to Email › Global Email Filters.
- Click Create a New Filter and give it a clear name, such as "Block example-spammer.com".
- Under Rules, choose what to check (such as From, Subject or Body), how to compare it (such as contains or equals), and the text to look for. Add more rules with + if needed.
- Under Actions, choose what should happen, for example Discard Message, Redirect to Email or Deliver to Folder.
- Click Create.
Example: block everything from one domain
- Rule: From contains
@example-spammer.com - Action: Discard Message
We suggest Discard Message rather than Fail with Message for spam. Spam usually comes from forged addresses, so a bounce goes to an innocent third party rather than the spammer.
Edit or delete a global filter
- Go to Email › Global Email Filters.
- Under Current Filters, click Edit to change a filter and then Save, or click Delete and confirm to remove it.
Good to know
- Because a global filter affects every mailbox, a rule that's too broad can quietly delete genuine mail across the whole account. Test with Deliver to Folder first, then switch to Discard Message once you're happy it only catches what you meant.
- To block a particular sender as spam, you can also add them to the blacklist in the MailScanner settings. See how spam filtering works and how to adjust it.