1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How to Use SpamAssassin

How to Use SpamAssassin

SpamAssassin is an anti-spam tool that helps filter out unwanted messages.

SpamAssassin works for all of the email accounts in your cPanel. It can be set to mark spam messages, so they are easy to notice. You can also choose to configure SpamAssassin to delete any emails marked as spam automatically.

HostGator recommends activating SpamAssassin as soon as you create an email account or log in for the first time.

Click on the link below to jump to a section:


How to Enable/Disable SpamAssassin

SpamAssassin is now integrated with the Spam Filters section in cPanel.
  1. Log in to cPanel.
  2. Navigate to the Email section, then click on the Spam Filters icon.

    Spam Filters Icon

  3. Click on the toggle bar to enable or disable the SpamAssassin.
    • If the toggle bar is blue, the SpamAssassin is Enabled.

      Enabled Spam Assassin

    • If the toggle bar is grayed out, then SpamAssassin is disabled.

      Disabled SpamAssassin


Spam Score Limit

SpamAssassin screens each incoming email message and scores it based on its spam characteristics. By default, SpamAssassin considers messages with a score of 5 to be spam; however, you can adjust the spam score limit according to your preference:

  • 1 means everything incoming will be marked as spam.
  • 5 is the default setting (and works well for typical users).
  • 10 means that any message with a score of 10 or less will not be marked as spam.
The spam score is visible when you click on the  Spam Threshold Score, where you can view and edit the spam score setting that will tag the messages spam and send them to a separate folder. The following method is how you can change the default score:
  1. Log in to cPanel.
  2. Navigate to the Email section, then click on the Spam Filters icon.

    Spam Filters Section

  3. Click on the  Spam Threshold Score link.

    Spam Threshold Link

  4. In the dropdown, select your preferred value.

    Spam Threshold Settings

  5. Click Update  Scoring Options at the bottom of the page.
Note: Changing these settings affects all email accounts in your cPanel.

Auto-Delete Spam

The auto-delete function automatically deletes messages which meet or exceed the spam score limit. Auto-delete can be enabled in the Filters section by clicking the toggle bar for Auto-Delete Spam.

  • If the toggle bar is blue, the Automatic Delete New Spam is Enabled.

    Enabled Auto Delete New Spam

  • If the toggle bar is grayed out, the automatic Delete New Spam is disabled.Disabled Automatic Delete New Spam

It would be best to have the Auto-Delete spam score set to a higher number than the one available in Spam Threshold Score though both can be utilized.

Spam Threshold Link

Note: Enabling auto-delete could cause you to lose emails that are not spam if SpamAssassin is not configured properly.

Email Filtering with SpamAssassin

You can use Spam Box or email filtering to move spam from your inbox to another folder.

 Spam Box

When Spam Box is enabled, a spam folder is created. Spam is then delivered directly to this folder, allowing you to review all mail marked as spam before it is deleted. To enable Spam Box, simply clicking the toggle bar in the Move New Spam to a Separate Folder (Spam Boxin the Spam Filters section

Spambox is enabled

Accessing Your Spam Folder

Spam is delivered to your spam folder when you have Spam Box enabled. However,  you will need to subscribe to the spam folder in your mail client to view or process spam messages held there. You can learn how to subscribe to your spam folder in this article:


User-Level Filtering

The settings you choose for SpamAssassin are applied to all email accounts in your cPanel. You can also use filtering for each email account to direct spam appropriately for that account.

Note: SpamAssassin must be enabled to set up the following filter.

Via Webmail

To filter an individual email account:

  1. Log in to your webmail. Usually, users will go to example.com/webmail and log in. (Replace example.com with your actual domain name.)
  2. Create a folder called spam. Use all lower case letters to name this folder.
    Click Here To See Instructions on How To Create Spam Folders in Roundcube and Horde

    How-to Create a Folder in Roundcube

    1. Log in to cPanel
    2. Navigate to the Email section, then click on the Email Accounts icon. 

      HostGator cPanel Email Accounts

    3. Click on the Check Email button. 

      HostGator cPanel check email button

    4. Click on Settings at the top-right corner.

      Roundcuber Settings

    5. Navigate to the Folders option, scroll down then, click on the + icon.

      Roundcube add folder

    6. Label the folder name as "spam."

      Roundcube spam folder

    7. Click on Save.

    How to Create a Folder in Horde

    1. Log in to cPanel
    2. Navigate to the Email section, then click on the Email Accounts icon. 

      HostGator cPanel Email Accounts

    3. Click on the Check Email button. 

      HostGator cPanel check email button

    4. Click on the Folder Actions dropdown, then select Create Mailbox.

      Horde Folder Actions

    5. In the pop-up, enter the mailbox name as spam.

      Horde create folder pop-up

    6. You can now see the spam folder in the left-hand menu. 
  3. Exit webmail.

Via cPanel

  1. In the Email section of cPanel, select the Email Filters icon.

    Email Filters icon

  2. Click Manage Filters next to the appropriate user.

     HostGator cPanel Manage UserFIlters

  3. Click Create a New Filter. You will be taken to a new page.

    Email Filters Page

    • In the Filter Name field, enter a name for the filter (such as SpamAssassin or whatever is desired).
    • Under Rules, select Spam Status from the first dropdown menu.
      Note: If this option is not available, check to make sure that Spam Assassin is enabled.
    • In the adjacent dropdown menu, select begins with.
    • In the large, blank box below the dropdown menus, type the word Yes.
    • Under Actions, select Deliver to folder from the dropdown menu.
    • Click Browse and select the "spam" folder.
    • When finished, click Create.

Now you can log back into your mail client and subscribe to the new spam folder.


Advanced SpamAssassin Configurations

Our shared servers support custom Spam Assassin configurations. For more information, please see the following article: