Tutorial to Configure SpamAssassin

SpamAssassin is an automated Email filtering tool which helps us to filter or stop receiving incoming spam or unwanted Emails. SpamAssassin is a product of Apache and is integrated in cPanel. It provides easy interface to set spam scores and classifying mails as spam based on this score. The spam mails will then be moved to the spam box and will not be found in the ‘inbox’.

This tutorial deals with how to configure SpamAssassin to filter incoming spam.

Enable SpamAssassin

To enable SpamAssasin go to cPanel >> Mail >>Apache SpamAssassin

sa

Click on Enable Apache SpamAssassin button to enable it.

In the filters section you can set the spam score. The higher the score is, more the chances are to classify the mail as spam. Recommended Score is 3.

You can also set Auto-Delete Spam option below to automatically delete the spam incoming spam mails rather than keeping it in the spam box. To disable this option, just click on the Disable Auto-Delete Spam button.

Configure SpamAssassin

If you click on the Configure Apache SpamAssasin button, it will take you to the configuration page. Please note that this setting will be specific to the particular cPanel account and the domains under it.

sa2

In the blacklist_from text boxes, you may specify the Email addresses which are trusted and should be passed through your the inbox.

In the whitelist_from text boxes, you may specify the Email addresses of persistent and known spammers which should be blocked from entering your inbox.

In the required_score text box, you may specify the Spam score. 5 is the default value and 3 is the recommended value. It defines the actual number of hits before classifying the mails as spam.

In the score text boxes, you may specify the test scores which checks the blacklists like Spamhaus. Here are some recommended test scores.

URIBL_DBL_SPAM 10.0 10.0 10.0 10.0

URIBL_WS_SURBL 10.0 10.0 10.0 10.0

URIBL_BLACK 10.0 10.0 10.0 10.0

T_DKIM_INVALID 2.0 2.0 2.0 2.0

RDNS_NONE 1.8 1.8 1.8 1.8

DCC_CHECK 5.0 5.0 5.0 5.0

After specifying these values, just click on Save.

If these values are not specified, SpamAssassin will take the default values. So this configuration is kind of an advanced setting.

Disabling SpamAssassin is really easy. Go to cPanel >> Mail >>Apache SpamAssassin and click on Disable Apache SpamAssassin

In cPanel servers, there will be account specific configuration files (user_prefs) for SpamAssassin and it is present in the directory /home/username/.spamassassin by default. For advanced options like setting the incoming languages and character codes, you can edit the said file.

Leave a Reply

Your email address will not be published. Required fields are marked *