Email

Improve SpamAssassin antispam classification

Reviewed on 3 min read antispam spamassassin

The cPanel antispam system is based on Apache SpamAssassin, software that examines incoming email using a series of tests to classify messages as spam or legitimate.

The messages each user receives vary in type, language and format. When the server has learning integration enabled, marking correct examples of spam and legitimate mail gives SpamAssassin extra signals and can improve classification over time.

Training the antispam system

When learning integration is enabled, you can mark a message as Junk in Roundcube to move it to junk mail and give that example to the system.

Use Not Junk on a false positive to move it back and give an example of legitimate mail.

Check the spam folder for legitimate mail classified by mistake. Learning is statistical and needs several examples; it does not guarantee a specific result or replace reviewing the threshold and the authentication.

Whitelist (safe) and blacklist (blocked)

Whitelists and blacklists change the score SpamAssassin gives the listed addresses. They are not absolute SMTP accept or reject controls and do not guarantee delivery.

A blacklist entry raises the score, but the final result depends on the threshold and the rest of the rules.

You can manage these lists in the "Spam Filters" section of cPanel by expanding "Show Additional Configurations".

In the whitelist you add senders whose score you want to lower; in the blacklist, those whose score you want to raise. Avoid domain wildcards unless you have considered that the sender header can be forged.

Adjust with comparable examples

Select individual messages you have reviewed. Do not mark a whole folder as spam if it contains legitimate conversations; do not mark a suspicious message as legitimate just to get it out of sight either.

If the problem keeps happening, compare the score and the header results of several messages. Review the Spam Filters threshold and actions before adding broad exceptions.

Change one setting at a time and watch new messages. Moving a message you have already received does not by itself prove that the server has learning integration. If it is not enabled, the action may simply move it to another folder.

A message rejected before it reaches the mailbox cannot be corrected by marking it in Roundcube. In that case you need to check the sender's notice or Track Delivery to identify the control that stepped in.

You may also find useful

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