How to Configure Spam Filters in cPanel

Reduce junk email on your hosting account by configuring the Apache SpamAssassin spam filters and rules in cPanel.

· Updated · 2,083 views

cPanel uses Apache SpamAssassin to score incoming email and filter out junk. Tuning it cuts down spam in your inboxes while reducing the chance of losing real messages.

Turning On Spam Filtering

  1. In cPanel, open Spam Filters under the Email section.
  2. If Apache SpamAssassin is off, click Enable.
  3. Spam is now scored, and high-scoring messages are marked.

Setting the Spam Threshold

The threshold is the score at which a message counts as spam. A lower number is more aggressive.

  1. On the Spam Filters page, set the Spam Threshold Score.
  2. A score of 5 is the default. Lower it to 3 to catch more spam, or raise it to 8 to be more lenient.

Start near the default and adjust only if too much spam gets through or real mail is flagged.

Auto-Delete vs Filter to Folder

You have two ways to handle flagged mail:

  • Auto-Delete: under Spam Auto-Delete, set a score above which spam is deleted before it ever arrives. Use a high score such as 10 so only obvious spam is removed.
  • Move to folder: leave auto-delete off and create a mail rule that moves flagged mail to a Spam folder, where you can review it.

Deleting outright risks losing real messages, so a Spam folder is safer when you start.

Whitelist and Blacklist

Click Show Additional Configurations to manage lists:

  • Whitelist (whitelist_from): always allow mail from these addresses.
  • Blacklist (blacklist_from): always treat mail from these addresses as spam.

Add a trusted sender to the whitelist if their messages keep getting flagged. Wildcards such as *@example.com cover a whole domain.

Was this article helpful?

Your feedback helps us improve our documentation.

Still Need Help?

Our support team is available 24/7 to assist you.