10 min read Diesen Artikel auf Deutsch lesen Lire cet article en français Ler este artigo em português

SpamAssassin Score: How It's Calculated

The short answer

SpamAssassin runs each message through a set of rules: header checks, body patterns, DNS blocklists, SPF and DKIM results and a Bayes classifier. It adds up the points of every rule that fires, and negative points count too. If the total reaches required_score, which is 5.0 by default in Apache SpamAssassin, the message is tagged as spam. To bring the score down, read the tests= list in the X-Spam-Status header and fix the rules that fired.

In this article

What does SpamAssassin do?

Apache SpamAssassin is an open-source filter that runs on the receiving side: on a mail server, at a hosting provider or in a gateway in front of a company mailbox. It doesn't block mail by itself. It scores the message, and the server running it then decides whether to file it, tag it or reject it. Each rule looks for one specific thing, like a missing Date header, a body that's HTML-only, a link domain on a URI blocklist, a failed SPF check or a valid DKIM signature. Each rule has its own score, and some scores are negative, so passing authentication can pull the total down. Apache's own description says SpamAssassin combines the results into one global score for the message, and a higher score means the message is more likely to be spam.

Once a message reaches the threshold, SpamAssassin can add headers such as X-Spam-Flag: YES, rewrite the subject line, or add a report to the message. In Mail::SpamAssassin::Conf, the report_safe option decides whether the original goes inside the report as an attachment or stays as it is with the results only in the headers. The person who runs the server picks these settings, not the sender.

Illustration for the question “What does SpamAssassin do?”
AI-generated image

How is the SpamAssassin score calculated?

The total is just a sum: the scores of every rule that matched, added together. Nothing gets weighted after that. Every rule falls into one of a few families, and it helps to know which family a rule belongs to, because each family has a different fix.

Rule family What it checks Example rule names What you can change as a sender
Header tests Structure and plausibility of the headers MISSING_DATE, RDNS_NONE Sending setup and the reverse DNS of the sending IP
Authentication SPF and DKIM results for the sending domain SPF_PASS, SPF_FAIL, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU DNS records on your own domain
Body and MIME tests Wording, HTML-to-text balance, MIME structure HTML_MESSAGE, MIME_HTML_ONLY Copy, a plain-text part, markup
Network blocklists Sending IP and link domains looked up against DNS blocklists URIBL_BLOCKED and other DNSBL or URIBL rules Link domains, IP reputation
Bayes classifier Token statistics the receiving server learned from its own mail The BAYES_ rules, one per probability band Little. It depends on what that server was trained on
Rule families in Apache SpamAssassin. Scores per rule change between rule-set versions and updates fetched with sa-update.

There's a catch here. Every server runs its own version of the rules, its own local scores and its own Bayes database. If the same message scores under 5.0 on one tester, it can still go over on a server whose admin set different scores. The spam-trigger-word rules are only one family, and usually not the one that decides the result. How content rules get their weight is covered in our piece on how spam filters score trigger words.

What is a good spam score?

In Apache SpamAssassin the default required_score is 5.0, set in Mail::SpamAssassin::Conf. Anything at or above that gets tagged as spam. The spamassassin man page says the same: by default, messages with a score of 5.0 or higher are tagged. The score-checker pages ranking for this term today use three rough bands: 0.0 to 2.0 is clean, 2.0 to 5.0 is borderline, and anything above 5.0 is treated as spam on most servers. Those bands come from the checker pages, not from Apache, and they assume nobody changed the threshold.

  • A negative or near-zero total usually means the authentication rules (SPF_PASS, DKIM_VALID) are offsetting whatever else fired.
  • A borderline total means a server with a stricter local threshold may already treat the message as spam.
  • Admins can lower required_score. A score that's fine at 5.0 fails at a lower setting, and you won't be told the setting.

Keep one limit in mind. A low SpamAssassin score only tells you how SpamAssassin judged the message. Gmail and Microsoft's hosted mail run their own filters, so a clean score doesn't predict where the message lands there.

Illustration for the question “What is a good spam score?”
AI-generated image

How to read the X-Spam-Status header

A server running SpamAssassin writes its result into the headers. Open the raw source of the message (Show original in Gmail, View source in most other clients) and look for a line that starts with X-Spam-Status, followed by Yes or No, then score=, required= and tests= with the rule names.

  1. Yes or No: whether the total reached the threshold on this server.
  2. score=: the sum of all rules that fired, including negative ones.
  3. required=: this server's threshold. If it isn't 5.0, someone changed it.
  4. tests=: the names of every rule that fired. This is the list you work from. Look each rule name up in the SpamAssassin rule documentation and sort them by family.

Start with the authentication rules. If SPF_FAIL appears or DKIM_VALID_AU is missing, the domain setup comes before any change to the copy. To check what your domain publishes right now, use the SPF, DKIM and DMARC checker.

How to test your email spam score

Test the real message, sent from the domain and account you'll actually use. A pasted draft has no headers, no DKIM signature and no sending IP, so the header and authentication rules can't run on it.

  1. Send the finished message, with links and signature, from your real sending setup.
  2. Save the raw message as an .eml file, or send it straight to a tester.
  3. Run it through SpamAssassin. On a machine with SpamAssassin installed, the command spamassassin -t message.eml runs test mode and adds the report.
  4. Read the tests= list and fix one rule family at a time.
  5. Send again and compare the rule lists, not just the totals.
Option How you submit What you get back Where it stops
Apache SpamAssassin, run locally Raw .eml file via spamassassin -t Total score and the full list of rules that fired Your local rules and Bayes data, not the recipient's. Blocklist lookups need working DNS. URIBL_BLOCKED means the lookup was refused, not that a domain is listed
Postmark spam check API Raw message sent to Postmark's JSON API, which Postmark describes as free SpamAssassin score for the message Scores against Postmark's configuration, not the recipient server's
Headers in a test mailbox on a server running SpamAssassin Send a normal message to an address you control That server's X-Spam-Status line with its own threshold Shows one server only. Many large providers don't expose a SpamAssassin header at all
As of November 2026. Ways to get a SpamAssassin score compared by the same properties.

MailerCheck is also cited in Google's AI overview as a tool for checking SpamAssassin scores. For how to run a broader test and read the results beyond SpamAssassin, see our guide to running an email spam test.

Illustration for the section “How to test your email spam score”
AI-generated image

What raises the score, and what doesn't fix it

For outreach senders, high totals usually come from the setup rather than the wording: SPF that doesn't cover the sending service, a missing or misaligned DKIM signature, a sending IP with no reverse DNS, or a link domain on a blocklist. Each of these shows up by name in tests=.

  • Swapping words while SPF_FAIL is still in the list doesn't help. The authentication rule keeps firing on every send.
  • Testing a draft that was never sent doesn't help either. Header and DKIM rules don't run without real headers.
  • Gaming the Bayes rules won't work. They reflect the receiving server's training, and you can't see that or change it.
  • Link shorteners and redirect domains can bring blocklist results you'd never get from your own domain.
  • An HTML-only body with no text part fires MIME rules, and you fix that in the structure, not in the copy.

Fixing SPF, DKIM and DMARC on your own domain is a DNS task. Our guide to DKIM, DMARC and SPF for cold email senders goes through the records in order.

What does a spam confidence level of 9 mean?

Spam confidence level (SCL) isn't a SpamAssassin number. It comes from Microsoft's Exchange Online Protection, which stamps it into the X-MS-Exchange-Organization-SCL header. In Microsoft's documentation on spam confidence levels, 9 is in the high-confidence spam range, the most severe verdict on the scale. That's a stronger verdict than plain spam, and admins often set it to quarantine instead of the Junk folder. You can't convert between SCL and a SpamAssassin score. They're different systems with different inputs, so a message can pass SpamAssassin and still get the top SCL verdict from Microsoft.

Illustration for the question “What does a spam confidence level of 9 mean?”
AI-generated image

Sender score vs SpamAssassin score

Sender score

Sender Score is Validity's reputation rating for a sending IP address. It's built from how mail from that IP has behaved over time, things like complaints and sending patterns, not from the content of any single message. A SpamAssassin score is the opposite: it's worked out fresh for each message on the receiving server. A good Sender Score won't stop RDNS_NONE or SPF_FAIL from firing on a particular message. Our article on what Sender Score rates and how to check it covers the lookup.

Email sender score

People searching for an email sender score usually mean one of two things: Validity's Sender Score for an IP, or the general idea of sender reputation that mailbox providers keep for each domain and IP. Neither one is a SpamAssassin score. SpamAssassin judges one message against its rules. A sender score judges the history of the source the message came from. If you send through a shared IP, the IP's reputation is shared with other senders. Your domain's reputation is tied to the domain you send from.

How EmailFlow OS sends, and what SpamAssassin sees

EmailFlow OS is a personalised AI video email product for B2B cold outreach. You record one video and upload it, connect your own Brevo account and sending domain, and import your prospect list into EmailFlow OS. EmailFlow OS turns that single recording into a separate version for each recipient and sends each one from your own inbox, through your own Brevo account and on your own sending domain. It never uses a shared platform sender. So the SPF and DKIM results that SpamAssassin's authentication rules check belong to your domain and the DNS records you control. Whether a receiving server scores a message as clean is still up to that server's rules. You can test an EmailFlow OS send the same way as any other: send a real one to a test address and read the tests= list. More on the product is on the EmailFlow OS home page.

Illustration for the section “How EmailFlow OS sends, and what SpamAssassin sees”
AI-generated image

Questions people ask

Can I change the SpamAssassin threshold for my recipients?
No. The required_score setting lives on the receiving server and only its admin can change it. The default in Apache SpamAssassin is 5.0, but admins can raise or lower it. As a sender, your only lever is which rules fire on your message. You do that by fixing authentication, structure and link domains, and checking the result in the tests= list.
Why does my score differ between two checkers?
Each checker runs its own rule-set version, local scores and Bayes database, and the network tests depend on DNS access. One checker might get a refused blocklist lookup (URIBL_BLOCKED) while another gets a real answer. Compare which rules fired, not just the totals. A rule that shows up in both reports is the one to fix.
Is a SpamAssassin score of 0 required?
No. In Apache SpamAssassin's default configuration, only reaching 5.0 or higher tags a message as spam. Many legitimate messages pick up a few points from rules like HTML_MESSAGE, and SPF_PASS or DKIM_VALID can offset them. What you want is a total well below the threshold, with no authentication failures in the rule list.

Share

LinkedIn X

Keep reading

All articles