spam filter

What is a spam filter?

A spam filter is a program used to detect unsolicited, unwanted and virus-infected emails and prevent those messages from getting to a user's inbox. Like other types of filtering programs, a spam filter looks for specific criteria on which to base its judgments.

Internet service providers (ISPs), free online email services and businesses use email spam filtering tools to minimize the risk of distributing spam. For example, one of the simplest and earliest versions of spam filtering, like the one that was used by Microsoft's Hotmail, was set to watch out for particular words in the subject lines of messages. An email was excluded from the user's inbox whenever the filter recognized one of the specified words.

This method is not especially effective and often omits perfectly legitimate messages, called false positives, while letting actual spam messages through.

More sophisticated programs, such as Bayesian filters and other heuristic filters, identify spam messages by recognizing suspicious word patterns or word frequency. They do this by learning the user's preferences based on the emails marked as spam. The spam software then creates rules and applies them to future emails that target the user's inbox.

For example, whenever users mark emails from a specific sender as spam, the Bayesian filter recognizes the pattern and automatically moves future emails from that sender to the spam folder.

ISPs apply spam filters to both inbound and outbound emails. However, small to medium enterprises usually focus on inbound filters to protect their network. There are also many different spam filtering solutions available. They can be hosted in the cloud, hosted on servers or integrated into email software, such as Microsoft Outlook.

email spam filtering
How a spam filter works

What are the different types of spam filters?

There are many different types of spam filters. The most frequently used filters include the following:

  • Blocklist filters. Blocklist filters block spam emails from senders that have been added to a comprehensive spammers list. Blocklist filters are updated frequently to keep up with spammers who change their email addresses relatively quickly. However, if spammers switch their email domain, the email might be able to trick the system and penetrate the filter until it is identified once again as spam.

    Enterprises often create their own blocklist filter to protect their business interests. For example, they can block headhunters who seek to poach their top talent for the benefit of other companies, including direct competitors. They can also block emails deemed to waste their employees' time, e.g., emails with special offers.
  • Content filters. Content filters examine the contents of each email and use that information to decide whether it is spam or not. These filters tend to work because spam email content is often predictable, offering deals, promoting explicit content or targeting basic human feelings, such as desire and fear. Those types of spammers tend to use target words, like special offer or discount, several times, which may trigger the filter. Some organizations also use content filters to examine emails for inappropriate language and block them accordingly.
  • Header filters. Header filters analyze email headers to determine if they originated from a legitimate source. This includes IP addresses recognized as often used by spammers and data indicating that an email was part of multiple emails sent at once to preselected recipients.
  • Language filters. Spammers often target people worldwide and, sometimes, send emails from geographic areas where the language is different from the recipient's native language. Language filters help block those messages, but if a business has a global customer base, it runs the risk of customer queries from another country going straight to the spam folder. As such, it always helps to check the spam folder when expecting such messages from global customers.
  • Rule-based filters. Rule-based filters enable users to establish specific rules and apply them to all incoming emails. Whenever content matches one of the rules, it automatically forwards the email to a spam folder. The rules can be specific words or phrases in the message or header. This type of filter is often popular with users who receive unwanted emails associated with memberships because rule-based filters can also target particular senders.
content filtering in action
How content filtering works to screen out objectionable, offensive, illegal and unwanted content -- including email spam -- while permitting acceptable content and messages

What is a spam filter on Instagram?

Email services providers are not the only ones who must deal with spam. Other platforms, like social media giant Instagram, must use spam filters to help maintain order. Instagram users can also use the spam filter to block harassment and unwanted direct message requests.

To limit spam on an Instagram account, users must do the following:

  • Set their account to private.
  • Disable similar account suggestions.
  • Be judicious when commenting and liking posts.
  • Block spammer accounts, and report them to Instagram.

What is a spam filter in cPanel?

The Linux cPanel interface enables the configuration of spam filter settings for user accounts in web hosting environments. Users can also use cPanel to configure and manage their blocklist and allowlist settings.

What is a spam filter on Google Voice?

In Google Voice, Google has a global spam filtering system that automatically redirects calls, texts and voicemails from any of the numbers listed in Google's global spam database. Users must enable this feature in the Calls tab of Google Voice settings.

What is spam filtering in machine learning?

In machine learning, spam filtering protocols use instance-based or memory-based learning methods to identify and classify incoming spam emails based on their resemblance to stored training examples of spam emails.

See also email virus, ingress filtering, egress filtering, filter, firewall and phishing.

This was last updated in December 2021

Continue Reading About spam filter

Dig Deeper on Threat detection and response

Enterprise Desktop
Cloud Computing