Every hosting account we run ships with Apache SpamAssassin, a mature spam filter that scores incoming mail and flags the junk. Out of the box it’s decent; with a little tuning it gets noticeably better. Here’s how to configure it.

Turning it on and setting the threshold

In cPanel, open Spam Filters. If it isn’t already enabled, switch it on. The key setting is the spam threshold score. SpamAssassin scores each message; anything above the threshold is treated as spam. The default is 5. Lower it to 3 or 4 to catch more junk, but be aware that too-aggressive scoring can flag legitimate mail. We usually suggest starting at 5 and only lowering if spam is getting through.

Choosing what happens to spam

Under Spam Threshold, expand the additional configurations. You can either mark spam (it still arrives, but tagged, so a mail rule can file it) or automatically delete it. We recommend tagging rather than auto-deleting at first, so you can confirm the filter isn’t catching anything it shouldn’t. Once you trust it, enable Auto-Delete for high-scoring messages.

Whitelists and blacklists

SpamAssassin lets you always-allow or always-block specific senders. Add trusted contacts or your own domains to the whitelist so their mail never gets flagged. Add persistent junk sources to the blacklist. Use wildcards like *@spammydomain.com to block an entire domain.

Filing spam into a folder

If you tag spam rather than delete it, set up an email filter (cPanel → Email Filters) that moves anything with the spam header into a Junk folder. That keeps your inbox clean while giving you a place to review false positives.

Don’t forget authentication

SpamAssassin filters incoming mail, but a lot of spam problems are really about your outgoing reputation. Make sure your own SPF, DKIM and DMARC records are set up — properly authenticated mail is far less likely to be spoofed by spammers pretending to be you.

Give the filter a week or two of real traffic and check the Junk folder occasionally for anything wrongly flagged. A little supervision early on pays off with a much cleaner inbox later.

Was this article helpful to you?

admin

Leave a Reply

You must be logged in to post a comment.