Skip to content
Atlas Hoster
Email › Receiving, sending and spam

Block a sender and filter your emails in cPanel

Updated on 18 November 2026Checked on cPanel & WHM documentation (last modified 2026-07-08); labels read on a demonstration cPanel in French and English on 11 November 2026

A filter applies a rule to every message you receive: if the sender or the subject matches, cPanel deletes the message, files it in a folder or forwards it. It is the way to stop seeing messages from an address that bothers you.

Before you start

  • You can log in to cPanel (see Log in to cPanel).
  • You have the exact address of the sender to block, or their domain (the part after the @).
  • Choose the scope: an Email Filter applies to a single mailbox; a Global Email Filter applies to every address on your account.
  • A filter does not stop the message from reaching the server: it decides what is done with it once received.

Steps

Block a sender

  1. In cPanel, open the Email section, then:
    • Email Filters for a single mailbox: click Manage Filters next to the address;
    • Global Email Filters for the whole account.
  2. Click Create a New Filter.
  3. In Filter Name, type a clear name, for example Block promo-spam. Careful: a name already in use overwrites the existing filter.
  4. Under Rules, choose From, then the operator equals, then the sender's exact address. To block a whole domain, choose the operator ends with and type @unwanted-domain.com.
  5. Under Actions, choose what cPanel does with the message:
    • Discard Message: the message is deleted without telling the sender;
    • Fail With Message: the message is deleted and the sender receives a failure notice;
    • Deliver to Folder: the message is filed in a folder, which is safer if you are not sure.
  6. Click Create.

Filter without blocking

The same procedure sorts messages: for example, rule Subject · contains · invoice, action Deliver to Folder · Invoices. To add a rule, click the + sign to the right of a rule; with several rules, choose whether all (and) or any (or) of them must be true.

Test the filter

In the mailbox's filter list, type a test message in the Filter Test box (with the address or words targeted), then click Test Filter. The result says whether each condition is true or false, and whether the message will be delivered normally or handled by the filter.

Change the order of the filters

Filters run in the order of the Current Filters list; a new filter goes last. Drag and drop a filter to move it up or down. The Stop Processing Rules action prevents the following filters from applying to the same message.

Another method: the spam filter's blacklist

In Spam Filters, click Show Additional Configurations, then Edit Spam Blacklist Settings, Add A New "blacklist_from" Item, type the address (the * character stands for several characters: *@unwanted-domain.com blocks the whole domain) and click Update Blacklist (blacklist_from).

Expected result

The filter appears in the list, and new messages from the targeted sender are deleted or filed according to the action you chose. A filter does not apply to messages already received.

If something goes wrong

  • The message still gets through: the sender's address may be slightly different (another address on the same domain). Block the domain with ends with, or re-read the address in the message headers. Also check that an earlier filter has not already handled it.
  • The filter deletes legitimate messages: a rule that is too broad (for example contains on a common word) catches too much. Prefer the exact address, or the Deliver to Folder action so you can check what is targeted.
  • An important message has disappeared: the Discard Message action leaves no trace. For the first few days, prefer moving to a folder.
  • The global filter is ignored: cPanel does not apply filters to messages that the server rejected before delivery (for example with the reject option of the Default Address).
  • The sender changes address on every message: a filter on the address is useless; try a rule on the domain, or see My emails land in spam for the opposite problem.

Frequently asked questions

What is the difference between an email filter and a global filter?

An email filter applies to a single mailbox; a global filter applies to every address on your account.

Discard or fail with message: which one?

Discard Message deletes the message without telling the sender anything. Fail With Message sends them a failure notice. For an unwanted sender, Discard Message is simplest; for a legitimate correspondent who mistyped the address, the failure notice lets them know.

Can I block a whole domain?

Yes: rule From, operator ends with, value @unwanted-domain.com.

How many filters can I create?

cPanel recommends several simple filters rather than one complicated filter, because the server handles them more efficiently.

How do I unblock a sender?

Delete the filter (Delete then Delete Filter) or, if you used the blacklist, remove the address from the list and save.

Need an email address on your own domain name? Discover our business email plans.

EmailAll guides