How to Use Spam Filters in cPanel to Block Unwanted Emails


This knowledgebase article provides a guide on using cPanel’s Spam Filters to minimise the influx of unwanted emails in your accounts. Utilising Apache SpamAssassin™, employs a suite of techniques to detect and manage spam effectively.

Understanding Spam Filters

Spam emails are not just annoying clutter in your inbox; they can also pose security risks through viruses or malicious links. By enabling Spam Filters in your cPanel account, you create a system that assigns scores to emails, estimating the likelihood of them being spam. You can configure how to handle emails flagged as spam, such as directing them to spam folders or deleting them automatically.

Activating Spam Filters in cPanel

Spam filters have been enabled screenshot

To turn on Spam Filters, follow these straightforward steps:

  1. Log in to your account. If you’re unsure how to log in, a helpful article can be found here.
  2. Go to the EMAIL section of the cPanel home screen and click on Spam Filters.
  3. Select ‘Process New Emails and Mark them as Spam’ to start filtering incoming emails. If you decide to activate auto-deletion of spam, adjust the deletion settings to ensure only high-probability spam messages are removed.

While the tool offers an auto-delete option for spam, it’s generally advised against activating this feature. A more prudent approach is to set up rules that divert suspected spam to a designated folder, allowing you to review these messages without risking important emails being deleted automatically. For step-by-step guidance on setting this up, refer to this informative article.


Experience Lightning-Fast Loading Speeds!

Secure your spot with the most reliable web hosting service today! Click here to turbocharge your website’s performance and ensure it’s always up and running. Join now and get unbeatable support!


Configuring your Spam Filter Settings

Spam filters list of configurations screenshot

Fine-tuning your spam filter settings in cPanel allows for more precise control over what constitutes spam, helping to ensure that legitimate emails are not inadvertently flagged or deleted. Here’s a detailed guide on how to customise these settings effectively:

  1. Log in to your account. If you’re unsure how to log in, a helpful article can be found here.
  2. Within the EMAIL section, select ‘Spam Filters’.
  3. On the spam filters page select Show additional configurations.
  4. Choose one of the headings below for what you wish to change.

Configuring Whitelists and Blacklists

Whitelists and blacklists are crucial for managing which emails are treated as spam and which are allowed through:

Whitelist Management

  1. Select ‘Edit Spam Whitelist Settings’.
  2. Select the ‘Add A New “whitelist_from” item’ button.
  3. Enter the email address in the provided text box
  4. Select ‘Update Whitelist (whitelist_from)’ to save the changes.

Blacklist Management

  1. Select ‘Edit Spam Blacklist Settings’.
  2. Select ‘Add A New “blacklist_from” item’.
  3. Enter the offending email address.
  4. Select ‘Update Blacklist (blacklist_from)’.

Adjusting Spam Scores

SpamAssassin uses a scoring system to determine the likelihood that an incoming email is spam. By configuring these scores, you can tailor the sensitivity of the spam filter:

  1. On the Spam Filters configuration page, select ‘Configure Calculated Spam Score Settings’.
  2. You can add new scores by clicking ‘Add A New “scores” item’.
  3. Select the specific test for which you want to set a score.
  4. Enter the desired score value.
  5. Select ‘Update Scoring Options’.

Recommended Test Scores

For effective spam management, the following scores are recommended. These values balance between being too aggressive, which might block legitimate emails, and too lenient, which might let spam through:

  • URIBL_DBL_SPAM: Set to 10.0 , this score targets specific URIs found in spam emails.
  • URIBL_WS_SURBL: Another URI-based test, also set to 10.0 to effectively block messages linked to known spam sources.
  • URIBL_BLACK: Set to 10.0, this tests against a widely recognised blacklist of URLs.
  • T_DKIM_INVALID: Set at 2.0, this score handles emails with invalid DKIM signatures, which are often a sign of spam.
  • RDNS_NONE: Set to 1.8, this test checks if the sending IP address lacks a reverse DNS entry, which can be indicative of spam.

Using these settings can help you effectively manage spam without risking the loss of important emails. It’s important to review and adjust these settings periodically based on the evolving nature of spam and email use within your organisation.


Don't Let Your Website Fall Behind & Be At Risk From Attackers!

In the rapidly-changing digital landscape, an outdated or malfunctioning website can hurt your business. Keep your site running smoothly, efficiently, and up-to-date with our premium Website Maintenance and Support Service.


Disabling Spam Filters

Spam filters have been disabled screenshot
Should you need to disable Spam Filters temporarily, perhaps to troubleshoot missing emails, the process is simple:

  1. Log in to your account. If you’re unsure how to log in, a helpful article can be found here.
  2. In the EMAIL section, click on Spam Filters.
  3. Select the ‘Process New Emails and Mark them as Spam’ toggle to disable the filters temporarily.