XiaTools

How to Read and Interpret Authentication-Results Headers for SPF

By Rohit, founder of XiaTools · Updated 22 Oct 2026

The Authentication-Results header is an email header inserted by a receiving mail server to record the outcome of various spam and authentication checks, including SPF, DKIM, and DMARC. To read an SPF result within this header, look for the spf= tag followed by a status indicator such as pass, fail, or softfail, alongside the domain evaluated in the smtp.mailfrom or smtp.helo address. Understanding this header allows you to diagnose why legitimate emails land in the spam folder or how unauthorized entities might be attempting to spoof your domain.

Structure of the Authentication-Results Header

When a receiving mail server processes an incoming message, it evaluates the sender's cryptographic and policy-based credentials. It then appends a standardized cryptographic trace of these checks into the message headers.

Every receiving provider, from major consumer webmail networks to corporate exchange servers, formats this header according to modern Internet Engineering Task Force (IETF) standards. However, the specific server identifier at the beginning of the header will vary depending on the infrastructure handling the inbound mail.

Breaking Down the Syntax

A typical header looks dense, but it follows a predictable key-value structure. Here is an example of an Authentication-Results header showing a successful validation:

Authentication-Results: mail.example.com;
	dkim=pass header.d=example.com;
	spf=pass smtp.mailfrom=bounce@example.com;
	dmarc=pass (p=quarantine sp=none dis=none) header.from=example.com

Let us break down the components relevant to Sender Policy Framework (SPF):

  • Mail Server Identifier: mail.example.com indicates the host that performed the evaluation and inserted the header.
  • Mechanism Tag: spf= specifies the protocol being evaluated.
  • Evaluation Result: pass is the outcome of the SPF check. Other common values include fail, softfail, neutral, permerror, and temperror.
  • Contextual Parameters: smtp.mailfrom=bounce@example.com tells you the exact envelope sender domain that was checked against the published DNS records.

Before diving deep into reading these headers manually, you can streamline your domain setup by using the SPF Record Generator to build error-free, standards-compliant policy records for your domains.

Core SPF Statuses and What They Mean

Interpreting the exact status code returned by the receiving mail server is crucial for email administration. Each status dictates how the receiving server should handle the message according to the sender's published policy and the receiver's internal trust algorithms.

1. Pass

The IP address sending the email is explicitly authorized by the domain owner in their DNS records. This is the ideal state for all outbound mail streams.

2. Fail

The sending IP address is explicitly not authorized by the domain's policy. When an SPF result is fail, receiving servers often reject the message outright during the SMTP transaction or route it directly to the spam folder, especially if DMARC enforcement is active.

3. SoftFail

The sending IP address is not explicitly authorized, but the domain owner has chosen a permissive stance using the ~all mechanism rather than -all. Messages with a softfail are typically accepted into the inbox but flagged or marked with a warning.

4. Neutral

The domain owner has declined to state whether the IP address is authorized, using the ?all mechanism. This is treated similarly to no SPF policy.

5. PermError

A permanent syntax error was encountered while processing the SPF record. Common causes include exceeding the 10-DNS-lookup limit or malformed record formatting.

6. TempError

A temporary error occurred, such as a DNS timeout or network failure on the receiving end. Mail servers usually defer the message and retry delivery later.

Step-by-Step Guide: Inspecting Headers in Real Environments

To effectively read authentication results, you need to know how to locate the header across different mail clients and tools. Because headers contain the complete routing path of an email, looking at the raw source is the most reliable method.

Finding Headers in Popular Email Clients

  • Webmail Platforms: Open the message, click the menu button (usually three dots or a gear icon), and select options like "Show Original" or "View Message Details". Look for the topmost Authentication-Results entry.
  • Desktop Mail Clients: Double-click the message to open it in a separate window, navigate to the file or properties menu, and locate the internet headers text box.

Command-Line Inspection Using PowerShell and cURL

If you are retrieving messages programmatically or testing automated mail flow via protocols like IMAP or POP3, you can inspect headers using administrative scripts or command-line tools. When testing local outbound relays or mail transfer agents (MTAs), you can inspect the transactional headers injected during delivery tests to 192.0.2.1 or internal test domains like 2001:db8::1.

# Example PowerShell snippet to retrieve top headers from an email item
$email = Get-MessageTrace -MessageId "<example-id@example.com>"
# Inspecting raw headers via specialized mail retrieval modules

Comparison of SPF Result Actions Across Mail Providers

Different mailbox providers interpret SPF results differently, particularly when balancing user safety against legitimate mail delivery. The table below outlines how major environments typically handle each outcome.

SPF Result Typical Gmail Action Typical Microsoft 365 Action Typical Corporate Gateway Action
Pass Delivered to Inbox Delivered to Inbox Delivered to Inbox
Fail Spam or Reject (if DMARC fails) Quarantine or Reject Quarantine or Block
SoftFail Delivered with potential warning Delivered to Inbox Flagged as suspicious or tagged
Neutral Delivered normally Delivered normally Treated as unauthenticated
PermError Treated as neutral/fail Treated as neutral/fail Blocked or flagged for review

Common Mistakes and How to Fix Them

When analyzing authentication results, administrators often misinterpret what the headers reveal. Avoiding these pitfalls saves hours of troubleshooting.

  • Confusing Mail From with Header From: The SPF check evaluates the smtp.mailfrom (envelope sender or Return-Path), not the visible From: header displayed in the email client. DMARC aligns these two, but SPF checks them independently.
  • Ignoring Multiple Authentication-Results Headers: As an email passes through forwarders, mailing lists, or internal cloud relays, multiple Authentication-Results headers accumulate. Always read the topmost header, which was added by the final receiving mail server.
  • Misdiagnosing Forwarded Emails: When an email is forwarded, the original SPF check often fails because the forwarding server's IP is not in the original sender's SPF record. This is an inherent limitation of SPF, which is why DKIM and DMARC are necessary to maintain authentication across forwarding paths.

Quick Checklist for SPF Header Analysis

  1. Locate the topmost Authentication-Results header in the raw email source.
  2. Verify the server identifier matches the receiving domain.
  3. Locate the spf= tag and confirm the status is pass.
  4. Check the smtp.mailfrom domain to ensure it matches your expected sending domain.
  5. Confirm that no DNS lookup limits (permerror) are degrading your policy evaluation.

By following this checklist and understanding the syntax of the authentication results header, you can quickly identify configuration errors, resolve delivery bottlenecks, and ensure your domain security posture remains strong.

Frequently asked questions

What is the difference between smtp.mailfrom and header.from in SPF?

The smtp.mailfrom is the envelope sender address evaluated by SPF, while the header.from is the friendly address displayed to the end user in their email client. SPF only validates the envelope sender domain.

Why does my SPF result show fail even though my record is correct?

An SPF fail usually happens when the email was sent through an unauthorized IP address or if the message was forwarded, which breaks SPF validation because forwarding servers alter the transmission path.

How many Authentication-Results headers should an email have?

An email typically accumulates one Authentication-Results header for each mail transfer agent that performs authentication checks. When reading headers, always look at the topmost header added by the final mailbox provider.

What does a SoftFail result mean for email deliverability?

A SoftFail means the sending IP is not explicitly listed in the SPF record, but the domain owner chose a permissive policy using ~all. Most receiving providers will still deliver the email to the inbox, often with a minor warning.

Can I use SPF alone to secure my domain against spoofing?

No, SPF alone is insufficient because it breaks during email forwarding and only checks the envelope sender. You should always pair SPF with DKIM and DMARC for comprehensive email authentication.

Related articles

Free tools