How to Create a Spam Filter
Let’s be honest, no one likes spam, not hosting providers, not web users, and certainly not us. That’s why it has become a reoccurring subject on the cPanel Blog. So, using one of our favorite features, Apache SpamAssassin, we want to equip you, the cPanel user, with a nifty trick to keep spam out of your inbox.
Apache SpamAssassin™
Preloaded into the cPanel dashboard, SpamAssassin is an open-source tool built to filter and classify emails while blocking spam. Through a combination of subject line and body text analysis, Bayesian filtering, and DNS blacklists, SpamAssassin drastically limits and can prevent spam from touching your inbox.
Creating a Spam Filter
In the Email section of your cPanel account, choose Apache SpamAssassin. (If your hosting provider hasn’t already enabled this feature, select Apache SpamAssassin and then switch it on.)
Now you’re ready to set up email filters and specify how powerfully you’d like SpamAssassin to gate and vet incoming messages.
First, head to the “cPanel Email” section, navigate to “Global Email Filters,” and select “Create New Filter.”
Then, select “Spam Bar” from the first menu in the “Rules” section and then choose “Contains”from the second menu in that same section.
In that field, enter a spam score using a series of (+) symbols, with 5 being an adequate number for an individual user. Select “Deliver to folder” from the “Actions” section and enter the name of the folder to which you would like to direct spam.
Finally, click “Create” to activate the spam filter and, voila, your first filter is set up! (Be sure to check to occasionally check this folder to ensure items that are NOT spam aren’t being flagged.)
To learn more about creating spam filters or Apache SpamAssassin in general, head over to our Knowledge Base.