Back to Posts List

Everything You Should Know About Spam Filters

Share this article

Last updated June 24th, 2021 by David Campbell in Guides, Security

Email spam filter

We are all aware of the spam folder in our email dashboard. This article deals with how spam filters automatically identify and divert spam mail from our inbox to the spam folder.

Spam filters are used to screen inbound emails (the emails entering a particular network) and outbound emails (the emails leaving the network). The Internet Service Providers utilize both methods for protecting the receiver and the sender.

There are many types of spam filtering solutions available. Some can be hosted on the cloud, while others are hosted on local servers. These filters can be integrated into different email software like Microsoft Outlook and Gmail.

53.95% of total global email traffic is classified as spam. Spam email is an issue of concern to both businesses and private citizens. Spam filters use complex algorithms for analyzing every email across multiple criteria.

How do spam filters work?

Spam filters work on heuristics techniques for optimal performance. In simple words, this means that every email message that comes to your inbox goes through thousands of algorithms or predefined rules. The analysis by the algorithms assigns a numerical score to the message, which determines if the message is or isn’t spam. 

If the total score passes a defined threshold, then the email is categorized as spam and automatically diverted to the spam folder. When you create a new Gmail, you are automatically activating the spam filter.

Spam filters are classified based on how they work:

3 types of spam filters

Content filters - These filters parse the content of the email and look for words that are commonly used in spam messages.

Bayesian Filters - Bayesian filters build a list of flagged words over time. They analyze both spam and regular mails and calculate the probability of the flagged words appearing in each type of mail. This enables them to add new words to the flagged list over time.

Rule-based filters - Rule-based filters follow customized rules that the user has defined. These predefined rules can include isolating specific email IDs from receiving mails or blocking emails that contain specific words in the body or the subject line.

In addition to the three filters mentioned above, email services also use the following filters:

  • Blocklist Filters - The filters block emails from a predefined blocklist of IP addresses. Some go

one step further and check the IP reputation of the originating domain.

  • Header Filters - Header filters scan the header of an email to look for specific words that are

classified as spam.

No single method offers a comprehensive solution. That is why spam filters often use a combination of different types of filters. Even then, you will have the occasional spam message drop into your inbox, or a standard message gets diverted to the spam folder.

Why are spam filters critical?

Spam filters are not foolproof. However, they are largely effective in blocking spam email, and a business email system that does not have a spam filtering facility will be highly vulnerable to malicious emails.

They also protect your email network from malicious content like viruses, clickbait web links that are compromised, and phishing attacks. Spam filters prevent your servers from getting overloaded with irrelevant emails. Spam filters provide a protective umbrella to your business, your network, and your employees.

What do spam filters look for?

To prevent your outgoing mails from being classified as spam at the receiver's end, you need to follow some basic rules. This section will look at issues that you should consider and avoid while setting up your email system and crafting your email campaigns.

Code and structure

Let’s start with the basics, the code that helps in creating your emails. Extra tags, sloppy code, and even the codes pulled from Microsoft Word are flags for spam filters. You can work with coding professionals to eliminate this problem associated with spam.

Code structure

The example code shown above has redundant coding. The code specifies using a grey background overlaid with a black background and an orange background with white letters. The simpler version would require an orange background with white letters.

Coding errors are classified by priority and severity. High-priority errors will have an immediate impact and hence need to be fixed first. Severity defines how critical the issue is likely to be over time.

As mentioned earlier, the copy-pasted codes from Microsoft Word and Frontpage might add extra tags or poorly coded HTML. This will immediately set off flags within the spam filters.

Another best practice is to keep your emails under 30 kb. Eliminate content that is not required to keep the size small. This is a high-priority issue that should be addressed from the get-go.

If you are running a business email campaign, avoid sending attachments with your emails. Attachments from unknown email addresses and servers are red flags for viruses or malware. This is another high-priority issue.

IP address

Your IP address is your online address and one of the essential parts of your email.  Email service providers check your IP address to see if it's blacklisted or on a caution list. Mails sent from these IP addresses are automatically redirected to the spam folder.

If the IP address has received complaints about sending spam emails, chances are it will already feature in blacklists.

This is why most companies are very selective when choosing the hosting service for their mail campaigns. It is also the reason why businesses don't run mail campaigns from their IP address. You don't want all emails from your domain to be classified as spam.

The marketing automation companies are aware of a bad IP reputation, limiting the senders who misuse the service.


The word Metadata means data about data. Email metadata includes details like the sender and receiver, the IP address from where the email was sent, the IP address of the receiver, and the timestamp of the email. 

The spam filters evaluate the metadata of the emails to classify the mail as secure or spam. To avoid the email from going to the spam folder, keep a few things in mind. One can use merge tags to personalize the To field in the email.

Asking the receiver to add you to their contact list is the best way to ensure that your emails go directly to their inbox.

Address your emails to the name of the person. Avoid addressing the emails directly to their email address, as this is another flag for the spam filters. I recommend using merge tags to prevent this.

Email domains like Gmail run aggressive algorithms when it comes to filtering spam mail. It takes time for private domains to acquire IP reputation, and hence it could be risky to send an extensive email campaign using the services of a new domain.

Some spam filters also conduct a Captcha test to verify if a human is sending the email or an automated mail.

Content and formatting

The content in any email must be clean, clear, and free of words typically associated with spam mails. Today, most private domains and ISPs have advanced spam filters that even select spam emails based on the content and images in the emails.

Format your email content

While there is no fixed rule for formatting your emails, there are some best practices you should follow:

  • Write as if you're writing to a friend. Shift your perspective from marketing to communicating.
  • Pay attention to your "From." As far as possible, use a real person instead of an obscure email address. You can also use common "from" fields like Contact or Support.
  • List your contact information. It gives your mail and brand credibility in the eyes of the spam filters and the viewers.
  • Limit the use of links and images and avoid broken links or links that go to spam sites.
  • Always offer your users an opt-out. Make sure that all your mails carry the unsubscribe link.

Avoid the use of words that are common in spam emails. The intelligent marketer always has a ready list of words to avoid.

Maintain a balance between text and images, write clean HTML code to ensure that the emails provide a good viewer experience.

spam or not spam emails

Many email clients will block the images in the emails by default. One must ensure that the emails can be understood even without the pictures.

In Closing

Spam filters are essential for protecting your email network for a secure business environment. When you decide to invest in a filtering solution or upgrade the existing solution, keep in mind that there is a lot of software available in the market. Start by defining your internal needs, take time to identify your internals, and then evaluate the products to see which one best fits the bill. 

Check whether the spam filtering software can block spam. Not all software can do the job well. The administrators must also have access to edit the existing rules to customize the rules as per organizational needs. Keep these things in mind, and you will get hold of spam filtering software that will do wonders for your needs.

David Campbell

David Campbell is a digital marketing specialist at Ramp Ventures. He helps manage the content marketing team at Right Inbox. When he's not working, he enjoys traveling and trying to learn Spanish.

comments powered by Disqus