How to configure spam filters

As Internet users, we have to deal with the problem of spam email. Most people already have effective tools to deal with spam, but they may be aware of it. It is very easy to configure spam filters that will protect us from all that unwanted spam.

Internet users typically fall into one of two categories. We probably have an ISP that offers spam filters or we have an online hosting service that offers them. We will take a look at the spam filters that are part of online hosting services. I am talking about those included in the cPanel of your hosting account. Most of the ones I’ve seen are very similar.

In cPanel you will see a section titled Mail. In the Mail section you will find the “User Level Filtering” option. This option will allow you to set filters for each email account that exists on your hosting account. Choose the particular account you want to set filters for. Click the button at the top labeled “Create a new filter.” When you do this, you’ll get a page that looks a lot like a web form. At the top, a name for the filter. You can set up a series of rules (think conditions) which, if met, will allow the server to deal with your spam.

In my case, I had used a particular account to check out some software on a particular website. It turned out that the site was not particularly reputable. From then on I received a lot of spam from this and maybe other companies. The common things about the emails were that they always came from a hotmail.com address and always had a long string of keywords together in the subject line similar to the following: HugeSotwareAdobeDealsMicroDiscountOffice2010Photoshop. By taking these common points into account, I was able to put together a good profile to filter these emails.

If you receive recurring mail from an email service like Hotmail, this is an effective first step. Sew “From” under the left side of the form. On the right hand side, choose “Regular Expression Matches”. Regex stands for “regular expression”. This gives you the power to match all mail that has a certain string in the spam phrase line. It’s hard to rule out Hotmail because it’s just part of a “source line.” But if you use “match regular expressions” – Hotmail, then the filter will select all mail that includes the expression Hotmail, even if run in conjunction with other words. This will pick all email addresses with a Hotmail domain regardless of what follows the “@” symbol.

Now you may not want to discard all messages from users who have Hotmail. Second, click the plus sign on the far right of the form. This will give you a new box for a new condition. In that box choose the theme and then match the regular expression again. Set the little dropdown between the first two conditions to y. For my example, the regular expression will be “soft”. Don’t use software because the spammer might shorten it and just use soft. This will pick up both software and software. Click another option and list a new condition. Here I would use subject and regular expressions again, this time using “or” in the dropdown between the two. Once again, list a word from the long chain, one that appears often in these emails, such as “Adobe.” You can repeat this once or twice, using “or” between each option.

Finally choose a new condition and then select “Spam bar” and “contains”. This is assuming your hosting company has equipped it with SpamAssassin, which is what most have. SpamAssassin rates all your email according to some scientific principles that determine how likely it is to be spam. It doesn’t filter email on its own, it just grades it. Here you will set filters to get mail with the above conditions and a SpamAssassin score of 5 or 6 or whatever you want. Enter the spam bar in the “contains field” by entering a consecutive number of plus symbols. Thing 5 in my instance. Be careful to set the spam bar too low or you risk losing valid mail. It is highly unlikely that any of my friends will send me an email from a Hotmail address that has those words in the subject line and also has a SpamAssassin score of 5.

There is a difference between “and” and “or” conditions. If you choose “y” the filtering must meet the entire combination of conditions. If you choose “or” the filtering will match the old conditions or the new one you are selecting. These options allow you to configure a filter that is specific to your situation and perhaps very specific. Be careful to be very general in the conditions, because if you do, you will probably lose some personal emails. Choose the details that are normally part of your spam emails and are not like the normal ones you receive.

The last thing you need to do is set an action. I just dismiss the email. Other options serve mainly to redirect unwanted mail to a specific folder on your server and this does not meet the needs of dealing with spam.

There now, that was not really very difficult. You can study different scenarios to find your own situation. You have now set up a spam filter that will act only on one email account and only if the problem conditions exist. SpamAssassin will only act on this account and not on the entire system. This is a smart and targeted spam filter designed just for you.

It is a pity that we have to deal with this type of parasite called spam. By learning how to set up spam filters at the ISP or Hosting level, it is possible to be free of many.

Leave a Reply

Your email address will not be published. Required fields are marked *