How do I filter spam in cPanel?
Turn on spam filtering for your hosted email, set how strict it is, send flagged mail to its own folder, and allow or block individual senders.
Junk mail builds up quickly on a new address. cPanel includes a spam filter that scores every incoming message and acts on the ones that look like junk. You control how strict it is and what happens to the mail it catches. This guide covers switching the filter on, tuning the strictness, and making exceptions for senders you trust.
To follow along, log in to cPanel, find the Email section on the home screen, and open Spam Filters.
Turn on spam filtering
- On the Spam Filters page, look for the setting called Process New Emails and Mark them as Spam.
- Switch it on.
- Leave the page open. The remaining settings on this screen are the ones you will adjust next.
With the filter on, every new message is given a score based on its content, its headers, and the reputation of the server that sent it. Anything scoring above your threshold is marked as spam. The filter only looks at new arrivals, so mail already sitting in a mailbox is not rescored.
Decide how strict the filter should be
- Click Spam Threshold Score.
- The box shows the score currently in use. On most accounts this starts at 5.
- A lower number is stricter and catches more. A higher number lets more through.
- Save the change.
Move the number by one at a time and give each change several days before judging it. Dropping the threshold sharply is the usual reason legitimate mail starts disappearing.
Send flagged mail to a folder or delete it
Two separate options decide what happens to a message once it is marked:
- Spam Box delivers flagged mail into a spam folder on the mailbox instead of the inbox. The folder shows up in webmail and in any mail app connected over IMAP, so you can still check it and rescue anything caught by mistake. This is the safer choice.
- Auto-Delete Spam discards flagged mail on arrival, with its own threshold that you set separately. Nothing is kept, so there is no folder to review and no way to recover a message later. Only use it once you have watched the spam folder for a while and you trust the scoring on your mail.
If you turn on auto-delete, keep its threshold well above your marking threshold. That way borderline messages land in the folder and only the obvious junk is thrown away.
Allow or block individual senders
- Back on the Spam Filters page, open Show Additional Configurations.
- Use the whitelist to list addresses that should always be delivered, such as a supplier whose invoices keep getting caught.
- Use the blacklist to list addresses that should always be marked as spam.
- Entries accept a full address or a wildcard for a whole domain, written as
*@example.com.
Whitelist entries take priority over the blacklist, so an address on both lists is delivered.
If it didn't work
- The domain's mail is not handled on this account. If the MX records point somewhere other than your hosting, cPanel never sees the messages and these settings have no effect. Check the MX records in Zone Editor.
- The spam folder is not subscribed. Some mail apps hide folders until you subscribe to them, so flagged mail looks like it has vanished. Look through the folder list in your app, or check webmail.
- The threshold is still doing its job. Scores take a few days of real mail to show a pattern, and a single message getting through is not a sign the filter is off.
Still seeing too much spam, or losing mail you wanted? Open a ticket at /support with two or three sample messages and we will read the headers with you.
More in Email
Stuck partway through? Support is answered by the engineers who run the servers, around the clock.