Improve the SpamAssassin antispam: train it and use whitelists and blacklists
The cPanel antispam is Apache SpamAssassin, which analyses every incoming email with a series of tests and gives it a score to decide whether or not it is spam.
It works quite well by default, but everyone receives different emails (in type, tone, language and format). To make it more accurate for your mailbox, it is worth training it: giving it examples of emails that are spam and emails that are not, so that it learns from them.
Train the antispam from webmail
Whenever the antispam gets it wrong, correct it from Roundcube:
- Spam has reached your inbox: select the email and click Spam in the top bar. The email moves to the spam folder and SpamAssassin learns from it.

- A legitimate email has gone to spam: open the spam folder, select the email and click Not spam. It goes back to the inbox and SpamAssassin learns that it got it wrong.

Check the spam folder from time to time and correct any mistakes you find. After a few weeks of corrections in both directions, the antispam improves a great deal.
Only mark emails you have reviewed one by one. Do not mark a whole folder as spam if it has good emails mixed in, because you would be teaching it the wrong thing.
Whitelist and blacklist
If there is a sender that should never go to spam (a customer, your bank, your accountant), add it to the whitelist. And if there is one you always want treated as spam, add it to the blacklist.
In practice they work like this: the whitelist takes 100 points off the email's score and the blacklist adds 100, so the result of the other tests no longer matters.
- In cPanel, open Spam Filters.
- At the bottom of the page, click Show Additional Configurations.

- Click Edit Spam Whitelist Settings (whitelist) or Edit Spam Blacklist Settings (blacklist). In recent versions of cPanel they are called Allow List and Block List.
- Click Add A New Item, type the address and save with the Update button.
You can add:
- A specific address:
example@domain.com - A whole domain:
*@otherdomain.com

Use the whitelist wisely: an email's sender can be forged, and anyone who knows your whitelist could slip spam or a scam past you by pretending to be that address. Add specific addresses rather than whole domains, and never public domains such as *@gmail.com.
The whitelist only affects new emails: you have to move the ones already in spam back to the inbox yourself. To change the filter's overall sensitivity, see how to adjust the SpamAssassin threshold.
You may also find useful
- Configure SpamAssassin: threshold, Spam folder and auto-delete Turn on cPanel's antispam (Spam Filters), choose whether spam goes to a folder or is deleted, lower...
- Add a safe sender in SpamAssassin Shows how to lower the SpamAssassin score of a specific sender address and explains why this list do...
- BoxTrapper: sender verification and reviewing the queue Describes how BoxTrapper holds unknown senders until they are verified and how to manage its lists,...
- Greylisting: why it can delay email Explains how greylisting holds back senders that do not retry delivery, why it can delay messages an...
Something wrong or out of date? Tell us and we will review it.