Table of Contents

Stopping Spam at the Gateway

Spam is electronic junk mail or any unsolicited commercial email. More than 95% of email messages sent worldwide is believed to be spam. Spam is not only a bother to email users, it increases the workload of your mail server and chews up a lot of network bandwidth. 

In this article, we will go over some of the basic methods used in blocking spam.

  1. Blacklists

    When you are using blacklists to block spam, you’re essentially blocking the domain names or IP addresses of known spammers. You can easily setup a simple blacklist for your own domain and share the list with all email user accounts under your domain name.

    Doteasy cPanel global email filters

    However, do note that blocking spam using blacklists. Spammers can change their email addresses (and domain names) fast and the overall effectiveness of blacklisting drops significantly. Also, if you are blocking spammers by their IP addresses, there is a chance you might block perfectly fine users that happen to be using that same ISP or IP address.

  2. Whitelist

    When you are using the whitelist method, you’re simply refusing all emails from all senders who are not on your approved list. When an email arrives at the mail server, it will be returned to the sender. Some mail servers may require the sender to send a message back confirming that there is in fact sent by a legitimate person.

    While in theory this method works better than blacklists, it is cumbersome. For example, if you regularly get mail from an website or an email list, you must set up a specific rule to allow this. If a previously approved friend moves to a different email address, you must update your whitelist with the friend’s new email address.

  3. Rules-based filtering

    The idea of rules-based filtering is very simple and easy to set up. All you need to do is come up with a list of spam identifiers, such as keywords and set up rules to delete emails containing the identifiers.

    Doteasy cPanel global email filter

    The problem with this method is you’re always a step or two behind the spammers – keeping the rules accurate and up-to-the-minute is a never-ending job and often you won’t know the latest spam keywords and trends until you have already received the spam message in your inbox.

  4. Bayesian filters

    Bayesian filters uses Bayesian logic to evaluate an incoming email and determine the probability that it is spam.

    In many ways, Bayesian filters are like rule-based filters. But instead of starting with pre-set rules, Bayesian filters learn to tell the difference between spam and good email. In fact, Bayesian spam filtering can be trained on a per-user basis.

    Another advantage Bayesian filters has over rule-based filters is it is more effective in avoiding false positives, where a legitimate email is incorrectly classified as spam.

    For example, if the email contains the word “free” (which is frequently used in spam), a predefined rules filter might reject it outright. But with a Bayesian filter, it will mark the word “free’ as a probably spam, but will also take in to consideration other important words in the email that might indicate the email is legitimate.