Skip to main content

Managing Email Filters and Spam Protection in cPanel

In this guide we will show how to manage Email Filters, Spam Filters, and Global Filters in cPanel

Updated this week

1. Create an Email Filter per account

Email Filters in cPanel let you automatically handle incoming messages based on rules you define. This helps reduce spam, organize mail, or block unwanted emails before they reach the inbox.

To create email filter, open "Email Filter" under "Email" section in your cPanel:

Click "Manage Filters" next to your email:

Then, click "Create a New Filter":

On next page, you can configure rules for your filter.

Give the filter a unique name so you can easily recognize it later. If you reuse a name, the old filter will be replaced.

Rules define what the filter looks for.


Examples:
• From contains a specific email or domain;
• Subject contains certain words;
• Spam Status or Spam Bar indicators.

Actions define what happens when a message matches the rules.
Common actions include:
• Discard the message
• Redirect it to another email address
• Deliver it to a specific folder

You can add more than one action if needed.

This screenshot demonstrates a completed example of an email filter configuration.

At the top, a filter name is entered to identify the rule. Below that, a rule is set where the From field contains a specific email address, meaning the filter will apply to messages sent from that address.

In the Actions section, the filter is configured to Deliver to Folder, with the destination set to the spam folder. This means any email that matches the rule will be automatically moved to that folder instead of appearing in the inbox.

For more details about rules, criteria, and operators, you can check the official cPanel documentation.

Once everything ready, click "Create".

2. Create a Global Email Filter

Global Email Filters apply to all email accounts under the domain, not just a single mailbox. They are useful for blocking common spam patterns, filtering entire domains, or enforcing consistent rules across all users.

To create a global email filter, open "Global Email Filters" under the "Email" section in cPanel.

Then click "Create a New Filter":

When you create a Global Email Filter, the principle is the same as when you create a filter for a separate email account (described in the first step).

Enter a unique Filter Name so it is easy to identify later. Then set the Rules that the filter should match:

3. Manage Spam Filters (Apache SpamAssassin)

cPanel uses Apache SpamAssassin to identify and filter spam messages automatically. This tool assigns a spam score to each message based on its content and headers.

To manage spam filtering, open "Spam Filters" under the "Email" section in cPanel:

You will see different Spam Filter settings:

By default, Apache SpamAssassin should be enabled. If it's not, enable it.

3.1 Spam Threshold Score

You can set the Spam Threshold Score, which determines how aggressive the filtering is. A lower score means stricter filtering, while a higher score allows more messages through. The default value is usually sufficient for most users.

To change the Threshold Score, click on "Threshold Score":

Then, you can select score that you want to set up:

To save changes, click "Update Scoring Options".

3.2 Spam Box

The Spam Box feature in cPanel automatically moves emails marked as spam into a separate folder called “spam” instead of delivering them to your inbox. Messages are filtered based on their spam score, and anything exceeding the configured spam threshold is redirected there.

In the Spam Box section you can empty spam folder for particular user or empty all spam folders.

3.3 Spam Auto-Delete

The Auto Delete feature in cPanel permanently deletes incoming emails that exceed the configured spam score threshold. By default, this feature is disabled. Once enabled, messages marked as spam are removed immediately and cannot be recovered. Because of this, it’s recommended to use Spam Box instead, which stores spam in a separate folder and allows you to review or restore emails if needed.

3.4 Additional settings (For Advanced Users)

These Additional Configuration options in cPanel are meant for fine tuning the spam filter behavior.

The Whitelist lets you specify email addresses or domains that should always be delivered, even if they look like spam. This is useful for trusted senders whose messages must never be blocked.

To create a whitelist, click "Edit Spam Whitelist Settings". Then , click "+Add A new "whitelist_form" Item" and enter the email address or domain that you always want to allow:

Enter the email addresses that should always be treated as legitimate and never marked as spam. Avoid whitelisting your own domain, such as *@example.com, because this can make it easier for spammers to impersonate your domain. You can use the * and ? wildcard characters for more flexible matching.

The Blacklist allows you to block specific senders or domains completely. Emails from these sources will always be treated as spam and rejected or filtered. The process to add specific email to the blacklist is the same:

The Calculated Spam Score Settings give advanced users control over how spam scores are evaluated. You can adjust how strict the filter is for certain conditions, but most users can rely on the default settings without changes.

We strongly recommend changing spam scoring settings only if you’re an advanced user. Incorrect adjustments can lead to unexpected behavior, such as legitimate emails being blocked or spam slipping through.

Did this answer your question?