Fix Microsoft 365 Inbound SPF softfail or permerror

What Microsoft 365 does with inbound mail that gets spf=softfail or spf=permerror, how to read Authentication-Results, and how to fix a missing sender, a broken SPF record, a gateway or a forwarder.

Home › Guides › Microsoft 365 inbound SPF softfail

Last updated 17 November 2026

Quick answer

On mail received by your Microsoft 365 tenant, open the message headers (or Message trace) and find Authentication-Results. Microsoft records the SPF result in this form:

spf=softfail (reason) smtp.mailfrom=example.com
spf=permerror smtp.mailfrom=example.com

softfail (and fail) means the connecting IP is not listed in the envelope-sender domain's SPF record. That is common after a new vendor, an on-premises relay or a forwarder is added, and it is also what you see on a lot of spoofed mail. permerror means the published SPF record could not be evaluated: Microsoft's troubleshooting guide names a record over the 10 DNS lookup limit, or more than one SPF TXT record for the same domain. In both cases Microsoft 365 still runs DKIM, DMARC and composite authentication (compauth). A softfail or permerror does not, by itself, always reject the message; delivery then depends on DKIM, DMARC, compauth, spoof intelligence and your anti-phishing policy.

If you send to someone else's Microsoft 365 tenant and their headers show these results, the same record problems are on your domain: fix them with the SPF Record Checker and the SPF Record Builder.

Where to read the result

  1. For a message already in the tenant, open it, view the headers, and paste them into the Email Header Analyzer. Look at spf=, smtp.mailfrom, dkim=, dmarc=, header.from, compauth= and the three-digit reason.
  2. In the Exchange admin center, use Message trace on the same message to confirm what Microsoft 365 recorded at the edge.
  3. Check the sending domain's published records with the SPF Record Checker, the Email Deliverability Checker and, if you have aggregate reports for a domain you own, the DMARC Report Analyzer.

Microsoft's Authentication-Results SPF syntax is spf= followed by pass (with the IP), fail (with the IP), softfail (with a reason), neutral, none, temperror or permerror, then smtp.mailfrom= and the envelope domain. The IP in parentheses is the client Microsoft evaluated, which matters when mail arrived through a gateway.

What each SPF result means

RFC 7208 defines the results. This is how they typically show up on inbound Microsoft 365 mail:

ResultWhat it means (RFC 7208)Typical cause on inbound mail
passThe client is authorized to use that envelope-sender domain.The sending IP is in the domain's SPF record (including via include).
failThe client is not authorized (-all matched).Missing vendor or relay IP; or a forwarder, whose IP is not in the original domain's record (expected).
softfailA weak statement that the host is probably not authorized (~all matched).Same causes as fail, on a domain that still uses ~all.
neutralThe domain makes no assertion (?all, or no terminating all).An incomplete record.
noneNo usable SPF record was found.The envelope-sender domain publishes no v=spf1 TXT record.
temperrorA temporary DNS error; a later retry might work.The authoritative DNS server timed out or was unreachable.
permerrorThe published records could not be correctly interpreted and need operator action.Two SPF TXT records; more than 10 DNS lookups; a syntax error; a missing include or redirect target (see include not found and void lookups).

Microsoft's troubleshooting table matches this for the common cases: none is no record; permerror is the 10-lookup limit or multiple records; temperror is a temporary DNS failure; softfail or fail means the sending IP is not in the record, often after adding a new email service or a non-Microsoft relay; forwarded mail failing SPF is expected because the forwarding server's IP is not in the original sender's record.

What Microsoft 365 does next

SPF is only one input. Microsoft 365 also checks DKIM and DMARC, then stamps composite authentication (compauth) on the From domain. From Microsoft's authentication and anti-spoofing docs:

For ~all (softfail), Microsoft's SPF setup page says sources not in the record probably are not authorized, so messages should be accepted but marked, and that what actually happens depends on the destination system (quarantine, Junk Email, or Inbox with a tag). Do not assume every inbound softfail is rejected, and do not assume every one is delivered.

Reason codes such as 000 (explicit DMARC fail at quarantine or reject) and 001 (implicit authentication fail) are covered in the compauth=fail reason-code guide.

Fix it when you receive the mail

Decide whether the sender is a service you expect.

  1. Legitimate vendor or partner, IP not in their SPF. Ask them to add the sending IP or include, or to sign DKIM with the From domain. You can confirm the published record with the SPF Record Checker and see MX hosting with MX Record Lookup. A temporary allow in spoof intelligence may keep mail flowing while they fix it; do not disable anti-spoofing for the whole tenant.
  2. Mail that reaches Microsoft 365 through an inbound gateway, appliance or another tenant. Microsoft evaluates the connecting IP, which is then the gateway, so SPF often softfails or fails even when the original sender is authorized. Turn on Enhanced Filtering for Connectors (skip listing) so Microsoft 365 can see the original connecting IP, and consider trusted ARC sealers if the gateway stamps ARC. Details are in the compauth guide and the forwarding and mailing lists guide.
  3. Forwarded mail. SPF failure is expected. Aligned DKIM, ARC and (on the sender's side) SRS are the durable fixes, not adding every forwarder's IP to the original SPF record.
  4. permerror on a domain you do not control. You cannot publish their DNS. If the partner is legitimate, have them repair the record (merge multiple TXT records, cut lookups, fix a dead include). The too many DNS lookups and void lookups guides are what you can send them.
  5. Unknown or spoofed sender. Leave anti-spoofing and the anti-phishing policy in place. Adding the sender to an allow list because one user expected the message is how spoofed invoice mail gets through.

Fix it when you send the mail

If other Microsoft 365 tenants (or your own test mailbox) show spf=softfail, spf=fail or spf=permerror on mail from your domain:

Verify the fix

  1. Check the sending domain with the Email Deliverability Checker and the SPF Record Checker.
  2. Send a new test message through the same path and paste the headers into the Email Header Analyzer. You want spf=pass with the expected IP, or, when SPF cannot pass (a forwarder), dkim=pass and dmarc=pass with a good compauth.
  3. Watch aggregate reports in the DMARC Report Analyzer if you own the sending domain: legitimate sources should pass aligned SPF or DKIM.

Audit hundreds of domains at once

Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).

Related tools and guides

Read the header with the Email Header Analyzer, then check the sending domain with the SPF Record Checker, SPF Record Builder, Email Deliverability Checker, DNS Lookup and DNS Propagation Checker. Related guides: Microsoft 365 compauth=fail, SPF for Microsoft 365, SPF too many DNS lookups, SPF include not found and void lookups, DMARC fail with SPF pass and DMARC fail after forwarding.

FAQ

What is the difference between SPF softfail and fail in Microsoft 365?

Both mean the connecting IP is not authorized by the envelope-sender domain's SPF record. fail is a hard fail (the record ended in -all); softfail is the weaker ~all result. Microsoft 365 records either value in Authentication-Results and then still evaluates DKIM, DMARC and compauth rather than treating softfail as an automatic reject.

Does Microsoft 365 reject mail with spf=permerror?

Not automatically, and Microsoft does not publish a single bounce string for this case. permerror means the SPF record could not be evaluated (Microsoft highlights more than 10 DNS lookups or more than one SPF record). The message still gets DKIM, DMARC and composite authentication, and spoof intelligence plus your anti-phishing policy decide whether it is delivered, junked or quarantined.

Why does SPF softfail on mail from a partner we already trust?

The IP that connected to Microsoft 365 is not in that domain's SPF record. Typical causes are a new sending service, an on-premises relay, an inbound gateway in front of your tenant, or a forwarder. Ask the sender to update SPF or sign aligned DKIM, and use Enhanced Filtering for Connectors if the mail arrives through your own gateway.

Can a good DKIM signature save a message when SPF softfails?

Yes. DMARC passes when either aligned SPF or aligned DKIM passes, and Microsoft composite authentication uses those results plus other signals. That is why DKIM matters for forwarded mail, where SPF almost always fails, and why a softfail alone should not be read as "this message is spoofed".

Where do I see spf=softfail or spf=permerror?

In the Authentication-Results header of the delivered or quarantined message, and in Message trace. Paste the headers into the Email Header Analyzer. The SPF check is against smtp.mailfrom (the envelope sender), not the From address people see.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.