mailskop.

Guide ·

Setting up SPF, DKIM and DMARC for Microsoft 365

By: Kemal Özleyen, Cybersecurity Engineer · Check Point Workspace Security Expert · Kinetik Bilişim

Microsoft 365 does not DKIM-sign mail from your custom domain by default: you need to publish two CNAME records and turn signing on. For SPF a single include:spf.protection.outlook.com is enough; take DMARC from p=none to reject in stages.

Check your record now

SPF

According to Microsoft’s documentation, most Microsoft 365 organisations need include:spf.protection.outlook.com in their SPF record. Any other sending services go into the same record; do not create a second SPF record.

If you send only through Microsoft 365:

ornek.com.tr  TXT  "v=spf1 include:spf.protection.outlook.com -all"

DKIM: not on by default

Microsoft signs mail sent with the *.onmicrosoft.com domain automatically, but according to its documentation there is no DKIM signing for mail from your custom domain (example.com) until you configure it. For DKIM to count in DMARC, the signature must align with the domain in the From address.

Setup is two CNAME records: selector1._domainkey and selector2._domainkey. The target format depends on when the domain was added to Microsoft 365: …dkim.mail.microsoft for domains added after May 2025, …onmicrosoft.com for older ones. The two formats cannot coexist for the same selector. Do not guess the values; read them from the Defender portal or with Get-DkimSigningConfig, then turn signing on after publishing the records.

New format (example; take your own values from the portal):

selector1._domainkey.ornek.com.tr  CNAME  selector1-ornek-com-tr._domainkey.ornek.n-v1.dkim.mail.microsoft
selector2._domainkey.ornek.com.tr  CNAME  selector2-ornek-com-tr._domainkey.ornek.n-v1.dkim.mail.microsoft

To read the values (Exchange Online PowerShell):

Get-DkimSigningConfig -Identity ornek.com.tr | Format-List Name,Enabled,Status,Selector1CNAME,Selector2CNAME

DMARC

Microsoft also recommends a gradual rollout: start with p=none, watch the reports, then move to quarantine and reject. See the p=none to p=reject guide for the steps.

Microsoft’s sample record includes pct=100. RFC 9989 no longer defines that tag; since 100 was the old default anyway, leaving it out changes nothing.

Starting point:

_dmarc.ornek.com.tr  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@ornek.com.tr"

Two domains people forget

  • *.onmicrosoft.com: SPF and DKIM are ready, but it has no DMARC record. If you do not use it for email, Microsoft says to add v=DMARC1; p=reject from the admin center.
  • Unused (parked) domains: according to Microsoft, publish no DKIM record for them, and declare through DMARC that they send no mail.

Microsoft 365 in our measurement

In Mailskop’s September 2026 measurement, 37.9% of the 5,098 domains detected as running on Microsoft 365 had no valid DMARC record; 15.3% enforced reject.

Because Microsoft 365 uses fixed selector names (selector1, selector2), Mailskop treats the absence of these two records as proof and reports “The DKIM records Microsoft 365 requires are absent from DNS”; on platforms with arbitrary selector names it draws no conclusion from absence.

Last updated: