Spam emails are an inevitable part of managing an online presence, but you don't have to let them overwhelm your inbox. While it's hard to stop every single spam email, cPanel provides powerful filtering tools that allow you to automatically sort, discard, or deliver unwanted messages to specific folders.
This guide will walk you through creating an Account Level (or Global) Email Filter in cPanel. This type of filter applies to all email accounts under your domain, making it an effective way to combat widespread spam and maintain a cleaner, more organised email environment for your business.
What You'll Need:
Before you begin, make sure you have the following:
- Access to your cPanel account via your EncodeDotHost customer portal.
- A clear idea of the criteria you want to use for filtering (e.g., specific words in the subject or body, sender addresses).
- A decision on the action you want the filter to take (e.g., discard, deliver to a specific folder).
Step 1: Access Global Email Filters in cPanel
Your first step is to navigate to the global email filter management section of your cPanel.
- Log in to your cPanel account.
- In the "Email" section, click on the "Global Email Filters" icon. This icon typically looks like an email envelope with a filter symbol.

Step 2: Create a New Filter
On the Global Email Filters page, you'll begin setting up your new spam-fighting rule.
- Click on the "Create a New Filter" button.
- Enter a descriptive Filter Name in the provided text box (e.g., "Discard Lottery Spam", "Block Specific Sender"). This helps you identify the filter later.
Step 3: Define Your Filter Rules
This is where you specify the conditions that an email must meet for the filter to take action. You can combine multiple rules for more precise filtering.
- Under the "Rules" section, you can filter emails based on various options.
- From the first dropdown list, select the part of the email you want to inspect (e.g., "Body", "Subject", "From", "To").
- From the second dropdown list, select the condition (e.g., "Contains", "Does Not Contain", "Equals", "Does Not Equal").
- In the text box provided, enter the word, phrase, or email address you want the filter to look for.
- Example: To discard emails containing the word "Lottery" in the body, you would select "Body" and "Contains", then type "Lottery" in the text box.
- To add more rules, click the "+" button next to a rule. You can then choose whether "all" rules must be met or "any" rule must be met for the filter to apply.
Step 4: Choose the Filter Action
Once an email matches your defined rules, you need to tell cPanel what to do with it.
- Under the "Actions" section, click the "+ Add Action" button.
- From the dropdown list, select the desired action:
- "Discard Message": This deletes the email completely without delivering it to any inbox. Use with caution!
- "Deliver to folder": Moves the email to a specific folder (e.g., a "Spam" folder you create).
- "Redirect to email": Forwards the email to another email address.
- "Fail with message": Rejects the email and sends a bounce-back message to the sender.
- Example: To get rid of unwanted messages, select "Discard Message".
Step 5: Create the Filter
Finalise your filter and activate it.
- Now, click on the "Create" button (or "Create Filter" button).
- You will receive a confirmation message that your filter has been successfully created.
Important Considerations:
- Global Impact: Account Level/Global Filters apply to *all* email accounts under your cPanel domain. Be very careful with "Discard Message" actions, as they can lead to permanent loss of emails for all users.
- Testing: Always test your filters after creating them by sending a test email that should trigger the filter.
- Order of Filters: Filters are processed in the order they appear. If you have multiple filters, their order can affect how emails are handled.
- Specificity: Be as specific as possible with your rules to avoid accidentally filtering legitimate emails.
Troubleshooting Tips:
- Legitimate emails being filtered:
- Review your filter rules for overly broad conditions.
- Consider changing the action from "Discard Message" to "Deliver to folder" so you can review filtered emails.
- Spam still getting through:
- Check for typos in your filter rules.
- Try adding more specific keywords or sender addresses to your rules.
- Consider creating additional filters for different types of spam.
- Still having trouble? Contact EncodeDotHost support with details of the issue and your filter rules, and they'll be happy to assist further.
By effectively utilising Account Level Email Filters in cPanel, you can significantly reduce the amount of spam reaching your inboxes, allowing you and your team to focus on important communications.