How to configure SpamAssassin in cPanel
After enabling your SpamAssassin feature under your cPanel -> Email -> Spam Filters
- The first settings to configure is Spam Box feature and Spam Threshold Score
The Move New Spam to a Separate Folder (Spam Box) button makes Exim create a spam folder – a separate folder in your mailbox, which will collect incoming emails marked as spam.
By default, email messages with the score 5 are considered to be spam. However, it is possible to adjust the filter according to your needs. The spam threshold can be configured using the Spam Threshold Score option.
Spam emails have higher calculated spam scores than regular messages. For example, an account that uses a Spam Threshold Score of 10 will only mark messages that are obviously spam.
It is possible to delete the messages collected by Spam Box using Configure Spam Box Settings >> Empty the Spam Box folder or Empty all Spam Box folders buttons:
NOTE: Spam folder may not be displayed by default once Spam Box is enabled. It will be required to enable its display in the Webmail client settings.
- The next option to configure will be Auto-Delete Spam feature:
The Auto-Delete option automatically removes the emails which meet or exceed the spam score set. In order to set it, navigate to Automatically Delete New Spam (Auto-Delete) widget and toggle it on.
You can set the required score using Auto-Delete Threshold Score or Configure Auto-Delete Settings.
NOTE: The Auto-Delete Threshold Score does not affect the Spam Threshold Score.
- The last option to configure is called Whitelist/Blacklist under “Show Additional Configurations”
It is possible to add some email addresses or domains to whitelist/blacklist using the Whitelist (Emails Always Allowed) and Blacklist (Emails Never Allowed) options.
If SpamAssassin often blocks certain email senders and marks its emails as spam (incorrectly), it is possible to add the sender to whitelist via Edit Spam Whitelist Settings.
To whitelist specific sender, just enter it into the whitelist_from field:
In other cases some emails may be incorrectly detected as non-spam by Apache SpamAssassin. If these email messages often come from the specific email senders, you can blacklist them using Edit Spam Blacklist Settings. SpamAssassin will then tag those ones as spam. To blacklist certain sender, just enter it into the blacklist_from field:
NOTE: whitelist and blacklist addresses are now file-glob-style patterns, so email@example.com, *@test.com or *.test.com will all work. Specifically * and ? are allowed, but all other metacharacters are not. Regular expressions are not used for security reasons.