For Microsoft 365, the core SPF record is v=spf1 include:spf.protection.outlook.com -all, published as one TXT record on the domain that appears in the From address. Add any other legitimate senders as extra include or ip4 terms before the -all, and keep the whole record under the SPF DNS lookup limit.
A wrong SPF record does not usually block all mail at once. It fails quietly, and receivers decide what to do based on DMARC and their own reputation data.
The record
example.com. TXT "v=spf1 include:spf.protection.outlook.com -all"
That is the minimum for a domain whose only sender is Exchange Online.
With a second sender, such as a marketing platform:
example.com. TXT "v=spf1 include:spf.protection.outlook.com include:mailer.example.net -all"
Rules that matter:
- There must be exactly one SPF TXT record on a name. Multiple records cause a permanent error.
v=spf1must be the first term.-allis a hard fail.~allis a soft fail. Start with~allonly if you are still discovering senders; finish with-allwhen the list is complete.- Every
includecounts toward the 10-DNS-lookup limit in RFC 7208. - A single TXT string is limited to 255 characters. Long records must be split into multiple quoted strings, which the DNS server concatenates.
Where the record goes
Publish the TXT record on the domain in the From address. For mail.example.com, SPF checks the domain in the envelope sender, which is usually a subdomain or the root depending on the sending system. If you send from a subdomain, that subdomain needs its own SPF record or a redirect.
Do not put the record on _dmarc. That name is for DMARC. Do not put it on a random subdomain unless that subdomain actually sends mail.
A worked example
A company sends from Microsoft 365 and also uses a support desk that sends from support.example.com through its own infrastructure.
- Publish the root record with the Microsoft include and
-all. - Ask the support vendor for its SPF instructions. It may provide an
includeor a list of IPs. - Publish a separate record on
support.example.comwith the vendor's include. Keeping it separate avoids mixing the vendor's lookups into the root record. - Check both records with a public lookup or the SPF, DKIM and DMARC checker.
- Send a test message from each system and read the authentication results in the headers.
If the support vendor insists on adding its include to the root record, check the lookup count first. A record that exceeds 10 lookups returns permerror, and all mail using that record can fail.
The lookup-limit trap
SPF allows at most 10 DNS lookups for mechanisms such as include, a, mx, ptr, exists and redirect. Each include may contain more includes. It is easy to reach the limit without noticing.
Symptoms include:
- A
permerrorresult in authentication headers. - SPF suddenly failing after an unrelated sender is added.
- A vendor's include silently dropping because the resolver gives up.
Tools that count lookups exist, and a careful DNS review is worth the time. Do not solve a lookup-limit problem by deleting a sender you still use. Move that sender to a subdomain with its own record.
Common mistakes
Two SPF records. Merging them is not optional. Receivers treat multiple records as an error.
Putting include after -all. Terms after -all are never evaluated. Order matters.
Using ptr. It is slow, unreliable and deprecated in practice. Use include or explicit IPs.
Forgetting the root domain when sending from a subdomain. SPF does not automatically inherit from the parent.
Publishing a record longer than 255 characters without splitting it. The record can be truncated or rejected by DNS tooling.
Assuming SPF alone authenticates the visible From domain. SPF authenticates the envelope sender. DMARC alignment is what ties it to the From header.
Testing
Use a public DNS lookup to confirm the record is visible, then send a real message to a mailbox you control and inspect the Authentication-Results header. You want spf=pass with the domain you expect.
DNS caching means a change can take time to appear. Check the TTL before you assume a mistake.
SPF and DMARC together
SPF passing is not enough for DMARC. The authenticated domain must align with the From domain. If Microsoft 365 sends with an envelope domain that differs from the visible From, SPF can pass while DMARC fails alignment. DKIM alignment often covers that case more reliably.
Publish DMARC at p=none first to see what the receivers report, then tighten. The DMARC p=none guide covers the discovery stage.
Where Wovu fits
Wovu is not a DNS tool and does not configure Microsoft 365. It finds a warm lead from a public signal, keeps the source, drafts the message, and sends an approved campaign on LinkedIn and email. It never tracks email opens, so the first email has no tracking pixel. Authentication remains your responsibility, and the checker shows what the public records say.
FAQ
What is the SPF record for Microsoft 365?
v=spf1 include:spf.protection.outlook.com -all, plus any other legitimate senders, published as one TXT record on the sending domain.
Can I have two SPF records?
No. Multiple SPF TXT records at the same name cause a permanent error. Merge them into one.
Does SPF stop spoofing on its own?
No. SPF alone does not stop a spoofed From header. DMARC with alignment is what makes the policy meaningful.
Why does my SPF record fail after adding a tool?
You may have exceeded the 10-lookup limit, added a term after -all, or created a second record. Count the lookups and check the record syntax.