New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
DeliverabilityUpdated 26 Oct 2026

SpamAssassin Scores Explained: Reading Rule Hits, Thresholds and Fixing Content That Triggers Them

How SpamAssassin scores a message: rule categories, the usual threshold, reading X-Spam headers, common rule hits and their causes, Bayesian and network tests, how to test your mail and why a low score does not guarantee delivery.

JL
Written by Jonas Lindqvist
Security Engineer
Reviewed by Hannah Mitchell
  • Published2 Apr 2025
  • Read time6 min
  • Length1,207 words
Share this guide

Apache SpamAssassin is one of the most widely deployed open-source spam filters. It sits behind many hosting providers, university systems, corporate gateways and self-managed mail servers, and its scoring model has influenced countless commercial products and online "spam test" tools. It works by running a large set of tests on each message, adding or subtracting points for each one that matches, and comparing the total with a threshold. A message above the threshold is treated as spam. Large mailbox providers such as Gmail or Microsoft use their own, far more complex systems, so a SpamAssassin score is never a forecast of what they will do, but it is a useful lens on message quality, and many business recipients really do use it. This guide explains how scoring works, how to read the headers it adds, which rule hits are common for legitimate senders, how to fix them, and how to test your mail without fooling yourself. For wider filter behaviour see how content filters work and the spam checker.

ScoringEach matching rule adds or subtracts points; the total is compared with a threshold (commonly 5.0)
EvidenceHeaders X-Spam-Status and X-Spam-Report list the rules that fired
LimitsA low score is not a promise of inbox delivery, and a high one is not always fatal
FixAddress the causes: authentication, structure, content, links and sending reputation

How the score is built

SpamAssassin applies several kinds of tests, each with a configurable score. Positive scores indicate spam-like features, negative scores indicate legitimacy. Typical categories:

CategoryExamples of what is checkedNotes
Header testsMissing or malformed Date, Message-ID, From mismatches, forged Received linesOften point to custom scripts. See the Date header and Message-ID
Body and text testsPhrases, capital letters, exaggerated claims, odd character useMostly rule-based patterns
HTML and structure testsHTML-only messages, tiny fonts, hidden text, image-heavy mailSee plain-text alternatives
URI and blocklist testsLinks to listed domains, raw IP URLs, URL shorteners, domain blocklistsSee shorteners and link reputation
Authentication testsSPF, DKIM, DMARC results and whether the sender is allowlistedPassing results give small negative scores; failures add points
Network testsDNS blocklists for the sending IP, URL blocklists, checksums of known bulk mail (when enabled)Depends on server configuration and network access
Bayesian classifierStatistical learning from the site's own spam and hamVaries between installations; can push a score either way
Local rules and pluginsSite-specific additionsExplains why the same message scores differently elsewhere

The default threshold for marking a message as spam is 5.0 points in many installations, but administrators can raise or lower it, and gateways may use different actions at different levels (tag, quarantine, reject). Treat any single value as a guide.

Reading the headers

X-Spam-Status: No, score=2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
        HTML_IMAGE_RATIO_02,HTML_MESSAGE,SPF_PASS,URIBL_BLOCKED autolearn=no
X-Spam-Level: **
X-Spam-Report:
  * -0.1 SPF_PASS SPF: sender matches SPF record
  *  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
  * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
  *  0.0 HTML_MESSAGE BODY: HTML included in message
  *  1.0 HTML_IMAGE_RATIO_02 BODY: HTML has a low ratio of text to image area

The status line says whether the message was flagged, the total score and the threshold ("required"), and lists the tests that fired. The report, when present, gives each rule's points and a description. Not all servers add these headers; some strip them before delivery. If you control the recipient server, enable report headers; otherwise send a test message to a mailbox that shows them. See reading headers.

Rule hits that often affect legitimate mail

Rule (typical name)What triggered itWhat to do
HTML_IMAGE_RATIO_*Too little text compared with image areaAdd real text; avoid mails made of one large image. See image hosting
MIME_HTML_ONLYNo plain-text partAdd a text alternative
MISSING_DATE / MISSING_MID / INVALID_DATEHeader problems from custom codeLet a mail library generate headers. See Date header
FROM_EXCESS_BASE64 / SUBJ_ALL_CAPSEncoding or style choicesUse readable subjects and standard encoding. See emoji and encoding
SPF_FAIL / SPF_SOFTFAIL / DKIM_INVALIDAuthentication problemsFix records and alignment. See authenticate your domain
RDNS_NONE / RCVD_IN_* (blocklists)Sending IP lacks reverse DNS or is listedFix PTR; check the blocklist check
URIBL_* / URL shortener rulesLinks to listed or abused domainsUse your own domains for links
FREEMAIL_FROM with business contentSending commercial mail from a free mailbox addressUse your own domain
TVD_SPACE_RATIO / obfuscation rulesOdd spacing or hidden characters in HTMLClean the template code
BAYES_xxThe site's classifier finds the message close to known spamImprove relevance; ask recipients to train the filter by marking wanted mail as not spam
LOTS_OF_MONEY / FREE_ type body phrasesPromotional wordingWrite plainly; avoid exaggerated claims

Testing your own mail

  1. Send a test message to an address that shows SpamAssassin headers, such as a mailbox on a server you control, or use an online test that reports the rules. Prefer tools that state which version and ruleset they use.
  2. Test the real message, sent from your real sending path, not a copy pasted into a different system. Authentication and IP reputation are part of the score.
  3. Read the rule list, not only the total. Fix causes in order of points.
  4. Change one thing at a time and retest, so you know which fix worked.
  5. Test variants: different recipients, with and without images, with the plain-text part, and with the final links and tracking.
  6. Keep a baseline. A template that normally scores 0.5 and suddenly scores 4 deserves a look at what changed.
  7. Build the check into your release routine. See rendering tests and template versioning.

Why a good score is not enough

  • Large providers use machine-learned models and reputation data you cannot see, with engagement as a major input.
  • Sender reputation (IP and domain) matters more than content for most major providers. See email reputation.
  • A low score on a test server says nothing about how Gmail, Microsoft or Yahoo will treat a message from a new domain with no history.
  • Conversely, a message with a few points of penalty can reach the inbox of a recipient who has engaged with you before.
  • Test tools differ in rules, versions and weights, so scores from two tools will differ.

Running SpamAssassin yourself

If you operate SpamAssassin for your own users, keep rules updated, train the Bayesian database with confirmed spam and ham, tune thresholds to your tolerance for false positives, and review quarantined mail regularly. Allowlist sparingly: an allowlist entry bypasses scoring and attackers will exploit it. Use authentication-aware allowlists (for example allowing a sender only if DKIM passes) where possible. Log scores to spot trends, and give users a simple way to report false positives. See allowing senders and gateway allowlisting.

A workflow for senders

  1. Authenticate fully and align (SPF, DKIM, DMARC) and fix reverse DNS.
  2. Send multipart messages with sensible text, restrained HTML and a healthy text-to-image ratio.
  3. Use your own domain for From and links.
  4. Keep subjects honest and avoid shouting styles.
  5. Run the final message through a test and fix any rule worth more than a point.
  6. Monitor real-world results: complaints, bounces, placement. See placement testing.

SpamAssassin scores are a tidy way to find the avoidable mistakes in a message. Use them to clean up your content and structure, then rely on authentication, list quality and engagement for the rest.

Check your authentication first Many rule hits disappear when SPF, DKIM and DMARC are right.

Open the checker

References and further reading

Frequently asked questions

What is a SpamAssassin score?

The total points from rules that matched a message. A score above the site threshold, often 5.0, marks it as spam.

Does a low score guarantee inbox delivery?

No. Large providers use their own systems and reputation data, so a test score is only a guide to content quality.

Where can I see which rules fired?

In the X-Spam-Status and X-Spam-Report headers, if the receiving server adds them.

What is the easiest way to lower a score?

Fix authentication and reverse DNS, add a plain-text part, balance text and images and use your own link domains.

Why do two spam test tools give different scores?

They use different SpamAssassin versions, rulesets, network tests and local settings.

Topics#spamassassin#spam score#content filters#headers#testing
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales