How to Whitelist or Blacklist an Email Address in cPanel
Sometimes you want to guarantee a sender always gets through (a client, a supplier), and sometimes you want a persistent nuisance blocked for good. cPanel lets you do both with email filters — whitelisting to always allow, blacklisting to always reject. Here is how to set each up.
Whitelist vs blacklist
- Whitelist — always deliver mail from this sender, never treat it as spam.
- Blacklist — automatically reject or discard mail from this sender.
Step 1: Open Email Filters
- Log in to cPanel.
- Under the Email section, choose Global Email Filters (for the whole account) or Email Filters (for one mailbox).
- Click Create a New Filter.
Step 2: Whitelist a sender
- Name the filter, e.g. "Whitelist client".
- Set the rule: From → contains → the sender's address or domain.
- Set the action to Deliver to folder (Inbox) so it is never filed as spam.
- Save.
Step 3: Blacklist a sender
- Create a new filter and name it, e.g. "Block spammer".
- Set the rule: From → contains → the address or domain to block.
- Set the action to Discard message (or fail with an error).
- Save.
For broader spam control, combine this with SpamAssassin and see stopping spam emails.
Frequently asked questions
Should I block by address or by domain?
Block a single address for one nuisance sender; block a whole domain only if all mail from it is unwanted, since spammers change addresses often. Blocking domains is powerful but can catch legitimate senders on shared services.
A wanted email keeps going to spam despite whitelisting.
Confirm the whitelist filter matches the exact sending address, and that it delivers to the Inbox. Also check the sender's own authentication is not failing, which can override local rules.
Does discarding a message notify the sender?
Plain discard silently drops it; "fail with error" tells the sender it was rejected. For blocking spam, silent discard is usually preferable so you do not confirm your address is active.
Was this article helpful?