How to Set Up and Use SpamAssassin with LyteHosting Print

  • cPanel, Spam Filters, Email Filters, Spam Filter
  • 714

SpamAssassin is an anti-spam tool that filters unwanted messages across all email accounts in your cPanel. It can be configured to mark spam emails for easy identification, or you can set it to automatically delete any emails flagged as spam.

LyteHosting recommends enabling SpamAssassin immediately after creating an email account or logging in for the first time.

How to Enable/Disable SpamAssassin

To manage SpamAssassin settings:

STEP 1: Log in to cPanel.

There are two methods to log into your cPanel.

  • Method 1: Log in to your cPanel directly.
  • Method 2: Log in to your cPanel through your Customer Portal.

Through your Customer Portal;                          

  • Log in to your Customer Portal.
  • Click on "Log in to cPanel".

Login - to - cPanel

STEP 2: Locate the Email section and click on Spam Filters.

cPanel - Email Section - Spam Filters

STEP 4: Within the Spam Filters section, use the toggle switch to enable or disable SpamAssassin.

  • If the toggle switch is blue, SpamAssassin is enabled.
  • If the toggle switch is gray, SpamAssassin is disabled.

Spam Filters - SpamAssassin on or off

 

Adjusting the Spam Score Limit

SpamAssassin evaluates each incoming email and assigns a score based on its spam characteristics. By default, a score of 5 indicates spam. However, you can adjust this score limit to suit your needs:

  • A score of 1 means all incoming emails will be marked as spam.
  • A score of 5 is the default setting and works well for most users.
  • A score of 10 means only emails with a score of 10 or higher will be considered spam.

The spam score appears when you click on the Spam Threshold Score, where you can view and modify the score limit that determines which emails are flagged as spam and sent to a separate folder.

Follow these steps to change the default score:

STEP 1: Log in to cPanel (Refer to the steps above if you need guidance on accessing your cPanel.)

STEP 2: Locate the Email section and click on Spam Filters.

cPanel - Email Section - Spam Filters

STEP 3: Click on the Spam Threshold Score link.

Spam Filters - Spam Threshold Score link

STEP 4: From the dropdown, choose your preferred value.

STEP 5: At the bottom of the page, click Update Scoring Options.

Spam Filters - Update Scoring Options

Note: Adjusting these settings will affect all email accounts in your cPanel.

 

Move New Spam to the Spam Box

You can use either the Spam Box or email filtering to direct spam away from your Inbox and into another folder.

Spam Box

When enabled, the Spam Box creates a dedicated folder for spam. Emails flagged as spam are delivered directly to this folder, allowing you to review them before deletion. You can also recover emails mistakenly marked as spam from the Spam folder.

To activate the Spam Box, click the toggle switch under Move New Spam to a Separate Folder (Spam Box) in the Spam Filters section.

Spam Filters - Move New Spam to a Separate Folder (Spam Box)

You can also clear or empty the Spam Box folder.

Spam Filters - Clear Spam Box

Auto-Delete Spam

The Auto-Delete feature automatically removes messages that meet or exceed the designated spam score limit. You can enable auto-delete in the Filters section by toggling the Auto-Delete Spam switch.

  • If the toggle is blue, Automatically Delete New Spam (Auto-Delete) is enabled.
  • If the toggle is gray, Auto-Delete is disabled.

It’s recommended to set the Auto-Delete spam score higher than the score in the Spam Threshold Score, although both settings can be used together.

Spam Filters - Automatically Delete New Spam (Auto-Delete)

Note: Enabling auto-delete could result in the loss of legitimate emails if SpamAssassin is not properly configured.

 

Whitelist, Blacklist, and Calculated Spam Score Settings

You can manage the spam filter settings for your email accounts by clicking Show Additional Configurations to access more options.

This will reveal the following features:

Whitelist

Whitelisting ensures that emails sent to your domain from specific email addresses or domains bypass the spam filter and go directly to your Inbox.

To whitelist an address:

STEP 1: Click Edit Spam Whitelist Settings.

Spam Filters - Edit Spam Whitelist Settings

STEP 2: On the Whitelist page, click Add a New "whitelist_from" Item.

STEP 3: Enter the email address that should not be flagged as spam. You can use "*" and "?" wildcard characters for more flexibility.

Spam Filters - Whitelist - Add a New whitelist_from Item

Important: Do not whitelist your domain. This could allow spammers impersonating your domain to bypass the filter.

 

Blacklist

Blacklisting marks any emails from a specific email address or domain as spam. This is particularly useful if you consistently receive spam from a particular address or domain.

To blacklist an address:

STEP 1: Click Edit Spam Blacklist Settings.

Spam Filters - Edit Spam Blacklist Settings

STEP 2: On the Blacklist page, click Add a New "blacklist_from" Item.

STEP 3: Enter the email address that should be flagged as spam. You can use "*" and "?" wildcard characters for greater flexibility.

Spam Filters - Blacklist - Add a New blacklist_from Item

 

Calculated Spam Score Settings

This feature is primarily for advanced users. It allows you to assign scores to individual tests within SpamAssassin. You can increase the score of tests that mistakenly allow spam to pass through your filter, or you can disable or reduce the score of tests that wrongly mark legitimate emails as spam.

To modify a score:

STEP 1: Click Configure Calculated Spam Score Settings.

Spam Filters - Configure Calculated Spam Score Settings

STEP 2: Click Add a New "scores" Item.

STEP 3: Select a new score from the dropdown menu.

STEP 4: Enter a value with up to 3 decimal places (setting it to 0 will disable the test).

STEP 5: Click the Update Scoring Options button to save your changes.

Spam Filters - Preferred Value - Update Scoring Options

 

Email Filtering for Individual Accounts

The settings you configure for SpamAssassin apply to all email accounts in your cPanel. However, you can also set up filters for individual email accounts to manage spam for each account specifically.

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

Using Roundcube to Filter an Individual Email Account

To filter an individual email account:    

STEP 1: Log in to your Webmail.

STEP 2: Once logged in, click on Settings on the left-side.

Roundcube - Webmail - Settings

STEP 3: Go to the Folders option, scroll down, and click the + icon.

STEP 4: Name the folder spam (use all lowercase letters).

STEP 5: Click Save to create the folder.

Roundcube - Folders - + Icon - Save

 

Using cPanel to Filter an Individual Email Account

STEP 1: Locate the Email section and click on Email Filters.

cPanel - Email Section - Email Filters

STEP 2: Click Manage Filters next to the appropriate user.

Email Filters - Manage Filters

STEP 3: Click Create a New Filter to open a new page.

Email Filters - Create a New Filter

STEP 4: In the Filter Name field, enter a name for the filter (e.g., SpamAssassin or another preferred name).

STEP 5: Under Rules, select Spam Status from the first dropdown menu.

Note: If this option isn’t available, make sure SpamAssassin is enabled.

STEP 6: In the next dropdown menu, choose begins with.

STEP 7: In the large box below, type "Yes."

STEP 8: Under Actions, select Deliver to folder from the dropdown.

STEP 9: Click Browse, then select the spam folder.

STEP 10: Once finished, click Create.

Email Filters - Create

Now, you can log back into your email client and subscribe to the newly created spam folder.


Was this answer helpful?

« Back