How to Set Up Efficient Spam Rules with cPanel

How to Set Up Efficient Spam Rules with cPanel

Spam emails can be a significant nuisance, cluttering your inbox and posing security risks. Fortunately, cPanel provides robust tools to help you manage and filter out spam effectively. In this article, we will guide you through setting up efficient spam rules using cPanel to keep your inbox clean and secure.

What You'll Need

Before you begin, ensure you have the following:

  • Access to cPanel for your domain.
  • Basic understanding of email filters and spam.

Step-by-Step Guide

Step 1: Access cPanel

  1. Log in to your cPanel account.
  2. Navigate to the "Email" section. You can find this section by scrolling down or using the search bar at the top.

Step 2: Enable SpamAssassin

SpamAssassin is a powerful spam filter included with cPanel.

  1. Click on "Spam Filters" under the Email section.
  2. Enable Apache SpamAssassin. Toggle the switch to enable SpamAssassin. This will start filtering incoming emails for spam.

Step 3: Configure SpamAssassin

Once SpamAssassin is enabled, you can configure its settings for optimal performance.

  1. Click on "Spam Threshold Score." Adjust the score to determine how aggressively SpamAssassin filters emails. The default is 5, but you can lower it to catch more spam or increase it if legitimate emails are being marked as spam.
  2. Enable "Auto-Delete Spam" (Optional). This will automatically delete emails marked as spam. Be cautious with this setting, as it might delete legitimate emails if the threshold is set too low.
  3. Configure Whitelist and Blacklist. Add trusted senders to the whitelist to ensure their emails are never marked as spam. Conversely, add known spam addresses to the blacklist to always mark their emails as spam.

Step 4: Set Up Email Filters

Email filters allow for more granular control over incoming emails.

  1. Go back to the cPanel home screen.
  2. Click on "Email Filters" under the Email section.
  3. Select the email account you want to manage.
  4. Click on "Create a New Filter."

Creating a Filter

  1. Name your filter. Give it a descriptive name.
  2. Set the rules. Define the conditions for your filter, such as:
    • From: Specific email addresses or domains.
    • Subject: Keywords commonly used in spam emails.
    • Body: Specific phrases that appear in spam emails.
  3. Choose an action. Decide what happens to emails that meet the filter conditions. Common actions include:
    • Discard Message: Permanently delete the email.
    • Redirect to Email: Forward the email to another address.
    • Move to Folder: Move the email to a specific folder, such as a spam or junk folder.
  4. Click "Create" to save the filter.

Step 5: Test Your Filters

It's important to test your spam filters to ensure they are working correctly.

  1. Send test emails from different addresses, including ones that should be marked as spam and legitimate ones.
  2. Check your inbox and spam folder to see if the filters are correctly identifying and processing the emails.

Step 6: Monitor and Adjust

Spam filtering is not a set-it-and-forget-it task. Regularly monitor your spam filters and adjust them as needed.

  1. Check your spam folder periodically. Ensure that legitimate emails are not being caught by your filters.
  2. Adjust the SpamAssassin threshold if you find that too much spam is getting through or too many legitimate emails are being marked as spam.
  3. Update your whitelists and blacklists as you encounter new trusted or spam email addresses.


By following these steps, you can set up efficient spam rules in cPanel, significantly reducing the amount of spam that reaches your inbox. Regular monitoring and adjustments will help keep your email experience smooth and secure. Happy emailing!

Table of contents

Blog categories

> Email campaigns> Server management> Entrepreneurship> Web design> CMS> E-commerce