Skip to content

DMARC Setup for M365 (2027 Guide)

Learn how to set up DMARC for Microsoft 365, configure DNS TXT records, enable DKIM CNAME selectors, and safely transition from p=none to p=reject.

By · Updated · Published

Photo of datacenter, hosting, neospire
Photo by NeoSpire · CC BY 2.0 · via Flickr

What is DMARC setup for M365?

DMARC setup for Microsoft 365 requires publishing a DNS TXT record at _dmarc with v=DMARC1 to instruct receiving email servers how to handle messages that fail SPF and DKIM authentication.

Deploying Domain-based Message Authentication, Reporting, and Conformance across Microsoft 365 establishes essential control over your outbound email identity. When attackers forge your domain name in phishing attacks, unprotected recipient servers cannot determine whether the message originated from your genuine tenant or a fraudulent mail relay. DMARC solves this vulnerability by linking the visible header address directly to verified cryptographic signatures and sender IP authorizations.

According to the Microsoft Defender DMARC documentation, the hostname value _dmarc is required. Furthermore, the entry v=DMARC1 identifies the TXT record as a DMARC TXT record. Destination mail transfer agents inspect this DNS entry whenever incoming email claims to arrive from your domain.

When you configure DMARC within Microsoft 365, receiving servers verify that the sender domain in the visible message header aligns with the identity validated by SPF or DKIM. If a message satisfies both authentication and identifier alignment, destination systems accept it with high delivery confidence. If a message fails authentication or alignment, the destination server consults your published policy tag to determine the required disposition.

Beyond message enforcement, DMARC provides complete visibility into outbound email delivery. Participating email receivers send aggregate XML reports detailing every sending source utilizing your domain. This comprehensive feedback allows tenant administrators to discover authorized cloud relays, identify misconfigured sending applications, and detect active impersonation campaigns across worldwide email channels.

What are the prerequisites before adding a DMARC record?

Flow chart of the 4 steps to configure dual CNAME selector records and enable DKIM signing in Microsoft Defender.
Configuring DKIM selectors in Microsoft 365

You must configure SPF with an include statement for Microsoft 365 and enable DKIM signing using dual CNAME selector records in the Defender portal before publishing DMARC.

DMARC functions as an evaluation layer that sits directly on top of Sender Policy Framework and DomainKeys Identified Mail. Because DMARC passes only when at least one underlying mechanism succeeds and aligns with the organizational domain, implementing DMARC without functional SPF and DKIM records causes legitimate corporate email to fail validation.

For SPF authentication, administrators must publish a DNS TXT record at the root domain specifying the authorized sending infrastructure of Microsoft 365. This record confirms that Exchange Online mail servers hold authorization to dispatch outbound messages representing your corporate domain.

For DKIM authentication, Microsoft 365 implements a dual-selector architecture for each configured domain. According to the Microsoft Defender DKIM documentation, Microsoft 365 email systems use CNAME records for DKIM authentication rather than TXT records. Administrators must publish two specific selector CNAME records pointing to Microsoft domain key endpoints:

  1. Create a CNAME record with host selector1._domainkey pointing to your designated Microsoft 365 selector target.
  2. Create a CNAME record with host selector2._domainkey pointing to your designated Microsoft 365 selector target.
  3. Access the Microsoft Defender portal under the email authentication settings page.
  4. Select your custom domain and activate the toggle labeled Sign messages for this domain with DKIM signatures.

Publishing both selector CNAME records enables Microsoft 365 to rotate signing keys seamlessly without downtime. Once DKIM signing is activated in the Defender portal, every outbound message receives a cryptographic signature tied to your organizational identity.

What did we compile from Microsoft and RFC specifications?

We compiled current Microsoft 365 DMARC deployment specifications, DNS record formats, and policy transition parameters from official Microsoft Defender documentation and IETF RFC 7489 on November 25, 2026.

Our dataset synthesizes foundational DNS configuration requirements, policy definitions, and operational recommendations across primary industry sources. The following comparison table outlines the three primary policy dispositions established in RFC 7489 and supported by Microsoft 365:

| Policy Value | RFC 7489 Definition | Destination Server Disposition | Recommended Operational Phase | | none | Domain owner requests no specific action | Normal inbox delivery with aggregate reporting | Initial deployment and monitoring (4 to 8 weeks) | | quarantine | Domain owner wishes failed mail treated as suspicious | Delivery redirected to recipient junk or spam folder | Phased policy enforcement (25% to 100%) | | reject | Domain owner wishes receivers to reject failed email | Message rejected outright during SMTP transaction | Final enforcement for full domain protection |

We compiled this dataset on November 25, 2026 to provide administrators with clear deployment parameters. A key finding from our review is that many organizations attempt to implement immediate rejection without an observational period. Official Microsoft guidance emphasizes maintaining an initial monitoring phase for 4 to 8 weeks. This operational timeline ensures that legitimate cloud services, transactional mailers, and external partners achieve complete SPF and DKIM alignment before strict policies take effect.

How do you form the initial DMARC DNS TXT record?

Publish a TXT record with host _dmarc, TTL 3600 seconds, and value v=DMARC1; p=none; pct=100; rua=mailto:dmarc-reports@domain.com to start collecting aggregate monitoring reports without blocking mail.

Creating your inaugural DMARC record requires accessing the DNS management console of your public DNS hosting provider. Within your DNS zone editor, you add a new TXT record specifically assigned to the subdomain _dmarc.

As documented in the Microsoft Defender DMARC documentation, under policy p=none, domain owners request no action against failed messages, allowing delivery according to destination filters while reports are collected. This neutral posture allows you to observe delivery patterns without exposing legitimate business communications to accidental quarantine or rejection.

The initial record incorporates several foundational tags that define reporting and operational scope:

  • Hostname: The DNS record must be created under host _dmarc with a standard TTL of 3600 seconds.
  • Version tag: The record must open with v=DMARC1; to identify itself to receiving MTAs.
  • Policy tag: Setting p=none establishes the passive monitoring state.
  • Percentage tag: The pct tag specifies the percentage of failed mail subjected to the DMARC policy, defaulting to 100 percent if omitted.
  • Aggregate reporting tag: The parameter rua=mailto: designates the mailbox address where receiving email systems deliver daily XML aggregate summaries.

Aggregate DMARC reports provide a periodic summary of authentication data from destination systems to the address specified in rua=mailto. These reports contain detailed diagnostic data, including connecting IP addresses, message counts, SPF evaluation results, and DKIM signature validations. By ingesting these reports, administrators identify any legitimate service sending on their behalf that requires SPF inclusion or DKIM key setup.

How should you transition from monitoring to reject policy?

Flow chart showing the 6-stage policy progression from p=none through quarantine percentage increases to p=reject at 100 percent.
Transitioning DMARC from monitoring to reject

Begin at p=none for 4 to 8 weeks, advance to p=quarantine with pct=25 to filter suspicious messages into junk folders, and finally enforce p=reject at pct=100 once legitimate senders pass authentication.

Transitioning to strict DMARC enforcement requires a deliberate, phased methodology. Rushing directly to rejection frequently results in the unintended blockage of crucial transactional notices, automated invoices, or third-party CRM communications.

Administrators should execute the following progression across their Microsoft 365 tenant:

  1. Maintain policy p=none for 4 to 8 weeks while processing incoming aggregate XML reports to audit all outbound email senders.
  2. Update SPF records and enable DKIM signing for any legitimate third-party services identified during the monitoring phase.
  3. Advance the DNS TXT record to policy p=quarantine with pct=25 so that one quarter of unauthenticated messages are diverted to recipient junk folders.
  4. Review subsequent aggregate reports to ensure that no legitimate business messages are marked as quarantined.
  5. Increase the filtering percentage from 25% to 50% and subsequently to 100% under the quarantine policy.
  6. Enforce policy p=reject with pct=100 to instruct destination servers to drop spoofed messages permanently during the SMTP transaction.

Under RFC 7489, the quarantine policy requests receiving mail servers to treat messages that fail DMARC as suspicious. When you eventually transition to rejection, the reject policy specifies that mail receivers should reject unauthenticated messages during the SMTP transaction. This multi-step path eliminates the risk of business disruption while achieving maximum domain spoofing defense.

How do DKIM and SPF alignment tags affect DMARC delivery?

The aspf and adkim tags control identifier alignment, defaulting to relaxed (r) where organizational domains match, or strict (s) where the exact fully-qualified domain name must match.

DMARC evaluation relies not only on whether SPF or DKIM passes technical verification, but also on whether the authenticated domain aligns with the domain visible to the recipient in the primary From header. Identifier alignment ensures that an attacker cannot pass SPF on a disposable domain while displaying your trusted brand in the sender address.

Under RFC 7489, alignment modes are configured through optional record tags:

  • The adkim tag specifies whether relaxed or strict DKIM identifier alignment mode is required, defaulting to relaxed (r).
  • The aspf tag specifies whether relaxed or strict SPF identifier alignment mode is required, defaulting to relaxed (r).

In relaxed SPF alignment mode (aspf=r), the domain in the SMTP envelope return-path and the From header domain must share the same root organizational domain. For example, mail sent with a return-path from mail.example.com aligns successfully with a From address of user@example.com. In strict SPF alignment mode (aspf=s), both domain strings must match identically.

Similarly, in relaxed DKIM alignment mode (adkim=r), the d= domain in the DKIM cryptographic signature must match or share the root organizational domain of the From header. In strict DKIM alignment mode (adkim=s), the d= domain must match the exact host name in the From address. For most Microsoft 365 environments, relaxed alignment provides robust security while accommodating varied cloud services and subdomains without operational failure.

More guides in Email Security.

Frequently asked questions

Why must SPF and DKIM be configured before DMARC?
DMARC evaluates message authenticity based on SPF and DKIM results. If neither authentication mechanism passes and aligns with the From domain, receiving mail servers will treat your legitimate emails as unauthenticated failures.
What does policy p=none do in Microsoft 365?
Policy p=none instructs recipient mail systems to take no filtering action against messages that fail DMARC. Email delivers normally according to the destination provider's filters while XML aggregate reports are delivered to your reporting mailbox.
How do aggregate DMARC reports work?
Receiving email providers generate daily XML summaries of all messages received claiming to come from your domain. These reports document sending IP addresses, SPF results, DKIM results, and message disposition without exposing individual message contents.

Sources

  1. Microsoft 365 requires publishing a DNS TXT record with hostname _dmarc and the identifier (learn.microsoft.com)
  2. Microsoft 365 email systems use CNAME records for DKIM authentication rather than TXT reco (learn.microsoft.com)
  3. Under RFC 7489, the none policy indicates that domain owners request no specific filtering (datatracker.ietf.org)