How to Stop Spam with the cPanel Spam Filter


Nobody likes spam, and if you are using your email inbox for business purposes, spam may be even more annoying when it takes up your valuable time. How can spam mail be blocked from your webmail account? Here we look at how to stop spam with the cPanel spam filter and email filters.

cPanel offers a built-in spam filter called Apache SpamAssassin, but this option may not be available on some web hosts, or you may not be able to configure it the way you would like. Fortunately, cPanel also comes with an option called Email Filters that allows you to define your own rules for processing emails. This can be found under the Email section of your cPanel.

First, look for the Spam Filters button and make sure you have it turned on. This is necessary to enable the system to scan for potential spam messages.

Navigate to Email Filters next. Under Email Filters, you can create any number of custom filters. These can be configured to deal not just with spam, but also to respond with other actions you may find useful, such as automatically replying to email queries or sorting certain emails under a label. However, we will only be looking at spam filtering in this article.

Email filters can be by individual email accounts or global – for all email accounts on your web domain. Either way, the process is more or less the same. To create a global email filter, click on the corresponding button. To create a filter for only one account, click on “Email Filters” and select the account you wish to add the filter for.

Next, go to “Manage Filters” and click on “Create a New Filter”.  This should bring you to the filter creation page, where you can enter the filter name. Be sure to name it something meaningful so that you will know at first glance what this filter is used for. Also, filter names must be unique, meaning that no two filters on this domain can have the same name.

You can then specify the rules of this filter. The most important one to change is the first dropdown box, where you should change “From” to “Spam Status”. Set the second dropdown box to “begins with”, and enter “Yes” into the text box below both dropdown boxes.

Alternatively, you can also set up these rules by using the “Spam Bar” option in the first dropdown box instead of “Spam Status”. Select “contains” for the second dropdown box. This allows the filter to detect spam based on each incoming email’s spam score, from 1 to 10. The lower the spam score, the more aggressive the spam detector – meaning that it will identify a message as spam at the slightest match of its contents. You can enter your desired spam score in the text box below, denoting each point of the score with a “+” character. For example, if you wish to filter all the messages with a score of 5 and above, enter “+++++” in the text box. Note that this feature only works if you have Apache SpamAssassin turned on.

When you are done defining the rules, select “Deliver to Folder” in the Actions box. Click on Browse, and you should be presented with a list of the folders on the email account. You can then choose to direct all filtered messages to the Spam folder or some other custom folder.

All that is left to do is to click on Create and your filter will be successfully applied! Make sure you test the filter with the provided option to ensure it is properly set up – or you could risk having non-spam emails filtered and losing important correspondence.

Alternative Rules

Of course, there are more than two ways to define the rules for a spam filter. You could also filter emails by specific keywords likely to be used in spam messages, such as “buy”, “money” or “earn”. However, depending on what you plan to use your inbox for, the likely spam keywords could also be commonly used in non-spam emails, so it may be a good idea to narrow down your search terms slightly more and constantly monitor your Spam folder in case anything did get sent there by mistake.

If you have been getting unsolicited messages from a certain sender or a particular domain, you can also configure the spam filter to block any messages coming from that particular address.

All in all, spam emails may be annoying, but they can be easily beaten with the right tools, even if you do not have a built-in spam removal available.

  • This is intended as a guide only to help users (please also do you own research). Systems for hosting and cPanel are constantly changing. However, at the time of writing, the information provided above is believed to be correct.

Copyright © 2022 All Rights Reserved xxiwebhosting.com