Fix Microsoft 365 Outbound Mail SPF Failures for One Recipient Domain
Question details
Identify why Microsoft 365 outbound messages fail SPF checks for one recipient domain while on-premises messages are delivered.

- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- A sender uses both Microsoft 365 and on-premises mail to send messages to the same recipient domain.
- Observed behavior
- The recipient domain rejects Microsoft 365 messages for SPF violations, although on-premises messages are delivered and the sender's SPF record includes spf.protection.outlook.com.
Obtain the complete non-delivery report (NDR), including the diagnostic information and sending IP address if available. Have an Exchange administrator check the message route and the DNS record for the envelope sender domain.
Trace the Rejected Message and Verify the SPF Evaluation
Use the NDR and message trace to identify the actual sending IP, mail route, and domain evaluated by the recipient.
SPF checks the connecting IP against the policy of the envelope sender domain, not simply the visible From address or the server hostname. A prod.outlook.com hostname alone does not establish whether SPF should pass.
Open the complete non-delivery report and note the rejection text, timestamp, recipient, sending IP, and any SPF evaluation details.
In the Exchange admin center, go to Mail flow > Message trace. Search by sender, recipient, and time, then open the trace to review the delivery events.
In the Exchange admin center, review Mail flow > Connectors for any outbound connector that routes the message through a gateway or other service. Compare the route with the IP reported in the NDR or recipient logs.
Ask the recipient administrator for the connecting IP, envelope sender domain, and SPF result from the rejection logs. Compare the IP with the sending services authorized in that domain's published SPF TXT record.
If the route and published record appear correct, provide the complete NDR and trace details to Microsoft support and coordinate with the recipient administrator. Share reports through an approved support channel because they can contain sensitive information.

Review the Sender Domain's SPF Record
Use this when the trace identifies a sending service or gateway that the evaluated domain's SPF record may not authorize.
Work With Office Files in WPS Office While You Resolve Mail Issues
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Its Microsoft Office format compatibility helps you move documents and spreadsheets between suites while your mail administrator investigates; it does not fix Microsoft 365 SPF or mail delivery.

Frequently Asked Questions
Why can on-premises mail succeed when Microsoft 365 mail fails SPF?
The two systems may use different outbound IP addresses or routes. Compare the connecting IP and envelope sender domain in the recipient's logs for each message, then check whether the relevant SPF record authorizes each route.
Does a prod.outlook.com hostname mean the SPF record is wrong?
Not by itself. SPF evaluates the connecting IP against the envelope sender domain's SPF policy. Use the NDR, message trace, and recipient logs to identify the actual IP and evaluated domain.
Where can I find the rejected message's route?
In the Exchange admin center, go to Mail flow > Message trace and search for the message by sender, recipient, and time. Review Mail flow > Connectors for any configured outbound routing, and compare the results with the recipient's logs.
Will changing -all to ~all guarantee delivery?
No. A soft fail may still be rejected under the recipient's policies, and it can weaken the published SPF policy. Coordinate any temporary change with the DNS administrator and continue investigating the sending route.




