Note: This article only applies if you have web hosting with us at mywebhostingaccount.com.
Note: For info about logging in to the cPanel interface, see the knowledgebase article: "Login to cPanel".
You are able to globally adjust the incoming email and spam filter settings in cPanel (applies to all domains and email addresses contained in cPanel) by using the "Spam Filters" section and/or the "Global Email Filters" section in cPanel.
You can also adjust email filters for specific email addresses by using the "Email Filters" section in cPanel
(Global) Change the Spam Threshold Score (the likelihood of a message being marked as spam):
- In cPanel, go to the "Spam Filters" page (in the search box, type "spam", and the "Spam Filters" option will come up)
- You will most likely see the option enabled that says "Process New Emails and Mark them as Spam:", which is the "SpamAssassin". The "SpamAssassin" is the program that scores the emails for potential spam, and if the email scores above a number threshold, the message will be labeled as spam (more "SpamAssassin" info here: https://blog.cpanel.com/spam-filtering-on-cpanel-everything-you-need-to-know-about-spamassassin/). The default spam threshold score is 5. You can change the spam threshold score from the cPanel spam filters page by clicking the "Spam Threshold Score" link. Higher scores let more spam through.
(Global) Add Email Addresses and Domains to Whitelist or Blacklist:
- In cPanel, go to the "Spam Filters" page (in the search box, type "spam", and the "Spam Filters" option will come up)
- Under the heading "Additional Configurations (For Advanced Users):", click "Show Additional Configurations"
- Then click "Edit Spam Whitelist Settings" or "Edit Spam Blacklist Settings".
- From the whitelist or blacklist page, click "Add a New ["whitelist_from" or "blacklist_from"] Item". There is cPanel documentation on some whitelisting and blacklisting settings here: cPanel - Whitelist and Blacklist. For example, you can whitelist or blacklist email from an entire domain by adding an asterisk before the @ symbol, like *@example.com.
(Global) Specific Manual Configuration Settings For Spam Filters
You can further customize the parameters to control how Spam Filters examines incoming messages. This can be helpful if there have been problems with spam email coming into the account in the past, as below we'll mention some recommended configured spam settings that differ from the default cPanel settings.
To customize Spam Filters in cPanel, follow these steps:
- In cPanel, go to "Spam Filters".
- Click "Show Additional Configurations".
Click "Configure Calculated Spam Score Settings":
- Click "Add A New scores item".
- In the scores list box, select the test name, and then type the score value."My Web Hosting Account" recommends using the following test scores:
- URIBL_DBL_SPAM 10.0 10.0 10.0 10.0
- URIBL_WS_SURBL 10.0 10.0 10.0 10.0
- URIBL_BLACK 10.0 10.0 10.0 10.0
- T_DKIM_INVALID 2.0 2.0 2.0 2.0
- RDNS_NONE 1.8 1.8 1.8 1.8
The URIBL_* tests check blacklists such as Spamhaus. The RDNS_NONE test checks to see if the sending IP address has a reverse DNS entry, while the DCC_CHECK test checks the DCC checksum database to detect bulk mail. If you later want to reset these scores to their default values, use the following test scores:
- URIBL_DBL_SPAM 0 1.7 0 1.7
- URIBL_WS_SURBL 0 1.659 0 1.608
- URIBL_BLACK 0 1.775 0 1.725
- T_DKIM_INVALID 0 0 0 0
- RDNS_NONE 0 1.1 0 0.7
- Click "Update Scoring Options".
(Global OR Specific Email Addresses) Create Email Filters:
- In cPanel, go to "Global Email Filters" OR for a specific email address filter, go to "Email Filters".
- If in the "Email Filters" section for a specific email address, next to the email address, click "Manage Filters". In the "Global Email Filters" section, this step is not needed, and you can go to the 3rd step.
- Click "Create a New Filter".
In the Filter Name text box, type the filter name.
You should use a filter name that is easily identifiable so you can tell what the filter's purpose is. Also, filter names must be unique; you cannot use duplicate filter names.Under Rules, specify the filter rules. For example, to filter e-mail messages that contain the word buy in the subject:
- In the first list box, select "Subject".
- In the second list box, select "contains".
- (for example) Type "buy" in the text box.
- Filters use strict logic in determining how to handle messages. Make sure that your filter rules are not too broad. Otherwise, you may unintentionally block messages that you want to receive. Also, the text in rules is not case-sensitive. A rule that specifies buy and a rule that specifies BUY are equivalent.
Click the + icon to add another rule.
You can add as many rules as you want. For example, the sample rule in step 5 blocks all messages that contain the word buy in the subject. This is a very broad rule that will likely block some legitimate messages. You can add another rule that specifies the word now in the subject. Select and in the list box. The filter will now match any message that contains the words buy and now in the subject line.- Under Actions, select the action for the filter to perform if the rule conditions are matched. You can specify multiple actions. To do so, click the + icon to add another action.
- Click "Create". cPanel creates the filter.
(Global OR Specific Email Addresses) Sending flagged spam email to a specified folder (spam folder)
After you have enabled Spam Filters, it uses scores to mark suspicious messages as spam. You can have Spam Filters automatically delete these messages. However, in this scenario, you may occasionally lose legitimate messages that are mistakenly marked as spam (these are known as “false positives”).
Alternatively, you can redirect all messages marked as spam into a separate folder in your account. You can check this folder periodically to see if any legitimate messages were mistakenly marked as spam.
If you use a third-party e-mail client application (such as Thunderbird or Outlook), you can set up this filtering directly on the client. However, you can accomplish the same effect by using e-mail filtering rules defined in cPanel. To do this, follow these steps:
- In cPanel, go to "Global Email Filters" OR for a specific email address filter, go to "Email Filters".
- If in the "Email Filters" section for a specific email address, next to the email address, click "Manage Filters". In the "Global Email Filters" section, this step is not needed, and you can go to the 3rd step.
- Click "Create a New Filter".
- In the Filter Name text box, type the filter name. For example, you could type "Spam Filter".
Under Rules, specify the filter rules:
- Change the value in the first list box from "From" to "Spam Status".If you cannot select the Spam Status option because it is gray, this means you have not enabled Spam Filters yet. You must enable Spam Filters first.
- Change the value in the second list box from "contains" to "begins with".
- In the text box below the two list boxes, type "Yes".
- Change the value in the first list box from "From" to "Spam Status".
- In the Actions list box, select "Deliver to Folder". (there will also be the options to "Discard Message", "Redirect to Email", "Fail With Message", "Stop Processing Rules", and "Pipe to Program", but this will go over just the "Deliver to Folder
- Click "Browse". A list of folders appears.
- If in the "Global Email Filters" section, the folders will list the domains that have email accounts set up for them. To direct the spam email to a specific email address's spam folder, click the + icon next to the domain, then click the + icon next to the username, then you can select the "spam" folder for that specific email address username.
- If in the "Email Filters" section for a specific email address already, you can select the listed "spam" folder there.
- Click "Create". cPanel activates the filtering rule for the account, and messages marked as spam are now redirected to the Spam folder.
(Global OR Specific Email Addresses) Testing An Email Filter
After you have created a filter, you should test it to make sure that it filters what you intended.
To test an email filter, follow these steps:
- In cPanel, go to "Global Email Filters" OR for a specific email address filter, go to "Email Filters".
- If in the "Email Filters" section for a specific email address, next to the email address, click "Manage Filters". In the "Global Email Filters" section, this step is not needed, and you can go to the 3rd step.
- In the Filter Test text box, type a test e-mail message.
- Click "Test Filter". The Filter Trace Results page shows if any rule conditions were met, and whether or not any actions will be taken.
Note: The official cPanel documentation on spam filters can be found here: docs.cpanel.net/cpanel/email/spam-filters
Note: The information in this article was partially obtained from these A2 Hosting articles, as "My Web Hosting Account" uses servers from A2 Hosting:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article