Email

Configure SpamAssassin: threshold, Spam folder and auto-delete

Reviewed on 3 min read anti-spam SpamAssassin

Spam Filters is the antispam included in every hosting plan. Under the hood it runs SpamAssassin, a well-proven analysis system that filters out the vast majority of unwanted mail.

Turn it on and choose what to do with spam

In cPanel, open Spam Filters:

cPanel Spam Filters page with the Process New Emails, Spam Box and Auto-Delete options

  1. Turn on Process New Emails and Mark them as Spam. From then on, SpamAssassin analyses every incoming email and gives it a score.
  2. Choose what to do with the emails it detects as spam:
    • Move New Spam to a Separate Folder (Spam Box): moves them to a spam folder in the mailbox. This is the recommended option, because you can review it and recover a good email that slipped in.
    • Automatically Delete New Spam (Auto-Delete): deletes them as soon as they arrive, with no way to recover them. It has its own threshold (in Configure Auto-Delete Settings), separate from the general threshold. If you turn it on, give it a high value so it only deletes the most obvious spam.

Adjust the filtering level

Every email gets a score. If it equals or exceeds the threshold (5 by default), it is considered spam. The lower the threshold, the stricter the filter.

  • You get a lot of spam: lower the threshold gradually (for example, from 5 to 4) until you find the point where it filters well without good emails ending up in the spam folder.
  • Lots of good emails go to spam: raise it (for example, to 6 or 8).

To change it:

  1. In Spam Filters, click the Spam Threshold Score (5) link.
  2. Choose the new value from the drop-down.
  3. Click Update Scoring Options.

cPanel Adjust Spam Threshold Score screen with the threshold drop-down and the Update Scoring Options button

Change it one point at a time and watch new emails for a few days before touching it again. The change does not affect emails that had already arrived.

Correct its mistakes from Roundcube

SpamAssassin starts from a common set of rules, but everyone receives different emails (language, content, attachments). That is why it learns from its mistakes when you correct them:

  • If spam reaches your inbox, select it in Roundcube and click SPAM in the top bar.

Button to mark as spam in Roundcube

  • If a good email has gone to the spam folder, open the folder, select the email and click Not spam.

You will find more detail, and how to add senders or domains to the allowlist or blocklist, in improve the SpamAssassin antispam.

If emails are missing

If an email is missing and you have Auto-Delete turned on, it may have deleted it: raise its threshold or turn it off. If it is not on, check the mailbox's spam folder and your email filters.

You may also find useful

Something wrong or out of date? Tell us and we will review it.