Skip to main content

How spam filters work

Every email that arrives at Gmail, Outlook, Yahoo, or any other email provider passes through a spam filter. These filters analyze hundreds of signals to decide whether to deliver the email to the inbox, send it to spam, or reject it entirely. Spam filters have evolved far beyond simple keyword matching. Modern filters use machine learning, sender reputation, engagement data, and authentication results to make decisions.

The filtering process

When your email arrives at a recipient’s mail server:
1

Authentication checks (SPF, DKIM, DMARC)

Fail = likely spam.
2

Reputation check (domain + IP)

Bad reputation = likely spam.
3

Content analysis

Spammy patterns = likely spam.
4

Engagement history

Recipients ignoring your emails = likely spam.
5

User-specific signals

The recipient’s past behavior with your emails influences the final decision: Inbox, Spam, or Reject.

Key factors

1. Authentication

Emails that fail SPF, DKIM, or DMARC are immediately suspicious. Proper authentication is the baseline — without it, everything else is irrelevant.

2. Sender reputation

Your domain and IP reputation are the strongest signals. A sender with a history of low complaints and high engagement gets the benefit of the doubt. See Sender Reputation.

3. Content

Spam filters analyze your email content for patterns commonly associated with spam: Things that trigger filters:
  • ALL CAPS in subject lines
  • Excessive exclamation marks (!!!)
  • Known spam phrases (“Act now!”, “Limited time offer!”, “You’ve been selected!”)
  • Misleading subject lines
  • Image-only emails with no text
  • URL shorteners (bit.ly, etc.) — they hide the real destination
  • Too many links
  • Large attachments
  • Broken HTML
Things that help:
  • Clean, well-structured HTML
  • A good text-to-image ratio
  • A plain text version alongside HTML
  • A clear, descriptive subject line
  • An unsubscribe link (required by law for marketing emails)

4. Engagement

Modern filters (especially Gmail) heavily weight engagement:
SignalInterpretation
Recipients open your emailsPositive — content is wanted
Recipients click linksPositive — content is relevant
Recipients replyVery positive — genuine conversation
Recipients move to spamVery negative — content is unwanted
Recipients delete without openingNegative — content is irrelevant
Recipients move from spam to inboxVery positive — false positive correction
Gmail uses engagement data not just per-recipient but in aggregate. If many Gmail users mark your emails as spam, Gmail may start filtering your emails for all Gmail users.

5. Infrastructure

Technical factors about how the email was sent:
  • Reverse DNS (PTR record) — the sending IP should have a valid PTR record
  • TLS — emails sent over encrypted connections are trusted more
  • Sending patterns — consistent volume is better than erratic spikes
  • List-Unsubscribe header — presence signals a legitimate sender

Provider-specific behavior

Each email provider has its own filtering logic:

Gmail

  • Relies heavily on engagement and domain reputation
  • Uses machine learning trained on billions of emails
  • Tabs (Primary, Promotions, Social) further categorize non-spam emails
  • Google Postmaster Tools gives visibility into how Gmail views your domain

Outlook/Hotmail

  • Uses Microsoft’s SmartScreen filter
  • Relies more on IP reputation than other providers
  • Has a Junk Email Reporting Program (JMRP) for feedback
  • Can be stricter with new senders

Yahoo

  • Uses DomainKey and DKIM heavily
  • Has its own complaint feedback loop (CFL)
  • Reputation is built per-domain

What to do when emails go to spam

  1. Check authentication — are SPF, DKIM, and DMARC all passing? Check the email headers.
  2. Check reputation — use Google Postmaster Tools to see your domain reputation.
  3. Review content — remove spammy language, fix broken HTML, add a plain text version.
  4. Check engagement — are you sending to people who want your emails?
  5. Check your list — remove inactive recipients, bounced addresses, and unsubscribes.
  6. Check volume — did you suddenly increase sending volume?

Email headers tell the story

When debugging spam issues, always check the email headers. They show exactly what happened:
Authentication-Results: mx.google.com;
       dkim=pass header.d=acme.com;
       spf=pass;
       dmarc=pass;

X-Spam-Status: No, score=-1.2
X-Spam-Score: -1.2
A negative spam score is good (not spam). A positive score means the filter found suspicious signals.

FAQ

No. There’s no way to guarantee inbox delivery. Each email provider makes its own decisions based on authentication, reputation, content, and recipient engagement. The best you can do is follow best practices consistently.
Less than they used to. Modern filters are much more sophisticated than keyword matching. That said, using aggressive sales language combined with other negative signals (bad reputation, low engagement) can tip the balance. Focus on writing naturally and providing value.
The Promotions tab is not spam — it’s Gmail’s categorization for marketing-style emails. Emails with promotional language, images, HTML templates, and unsubscribe links tend to land here. Transactional emails (receipts, password resets, notifications) usually land in Primary.