Skip to main content
EmailToolBox LogoEmailToolBox
HomeAll ToolsSuper Lookup
Email Health CheckEmail DeliverabilityEmail Blacklist CheckerEmail Header AnalyzerSPF CheckerDKIM CheckerDMARC CheckerMX Lookup
View All Tools
SPF CheckerDKIM CheckerDMARC CheckerSPF GeneratorDMARC GeneratorBIMI CheckerMTA-STS Checker
Guides
中文

Related Tools

MX Lookup
Check mail servers
Email Blacklist Checker
Check IP reputation
DNS Lookup
DNS record queries
SPF Checker
Validate SPF records
DMARC Checker
Check and analyze DMARC records
Email Header Analyzer
Analyze email headers
DKIM Checker
Verify DKIM signatures
WHOIS Lookup
Domain registration info
SMTP Test
Test SMTP connectivity
SSL Certificate Lookup
Check SSL certificates
DNS Propagation Checker
Check DNS propagation
Ping Test
Test network connectivity
Traceroute
Trace network path
Subnet Calculator
Calculate IP subnets
What Is My IP
Check your IP address

Need Help?

Our tools are designed to be intuitive, but if you need assistance, we're here to help.

DocumentationContact Support

About Our Tools

Professional-grade email and DNS diagnostic tools trusted by IT professionals worldwide.

Free to UseNo RegistrationReal-time Results
EmailToolBox LogoEmailToolBox

EmailToolBox is a free suite of email testing, deliverability and domain diagnostics tools. Check your email health, validate SPF/DKIM/DMARC, look up DNS records and monitor blacklist status in seconds - no signup required.

  • Free to use
  • No signup required
  • Instant results
  • Real-time DNS checks
  • Privacy-focused

Email Diagnostics

  • Email Health Check
  • Email Deliverability
  • Email Blacklist Checker
  • Email Header Analyzer
  • Email Verifier
  • HTML Email Validator
  • Email Preview Simulator
  • Spam Test
  • Email Health Report

Email Authentication

  • SPF Checker
  • DKIM Checker
  • DMARC Checker
  • DMARC Report Analyzer
  • SPF Generator
  • DMARC Generator
  • BIMI Checker
  • MTA-STS Checker

DNS & Infrastructure

  • MX Lookup
  • DNS Lookup
  • TXT Record Lookup
  • CNAME Record Lookup
  • NS Lookup
  • DNS Propagation
  • PTR/rDNS Record Lookup
  • SMTP Test
  • WHOIS Lookup

Resources

  • Email Guides
  • All Tools
  • FAQ
  • Contact Us
  • About
  • Privacy Policy
  • Terms of Service

Friend Links

  • Favicon Generator
  • Email Testing tools
  • Morse Code Translator
  • Password Remover
  • Regex Cheat Sheet
  • free barcode generator
  • Free Online PDF Tools
  • fast chart
  • refnet
  • world market hours

© 2026 EmailToolBox - Email Testing, Deliverability & Domain Diagnostics. All rights reserved.

    1. Home
    2. Guides
    3. Microsoft 365 SPF & DKIM Advanced Setup
    Categories
    Related Guides

    Office 365 DKIM Setup Guide

    Detailed steps for configuring DKIM signatures in Microsoft Office 365

    AWS DKIM Configuration Tutorial

    Enable DKIM for Amazon SES and publish DNS records

    Azure SPF Configuration Tutorial

    Publish SPF records for Azure/Microsoft 365 sending services

    Microsoft 365 SPF & DKIM Advanced Setup

    Configure SPF includes, enable DKIM, and validate alignment for hybrid M365.
    3 min read
    Updated 2025-10-23
    Brand Specific
    m365spfdkimdmarchybrid

    The standard Microsoft 365 setup — one SPF include, two DKIM CNAMEs, a DMARC record — covers a tenant that only sends through Exchange Online. It stops covering you the moment a hybrid relay, a second verified domain or a third-party sender enters the picture. This guide covers those cases.

    Hybrid: on-premises relay still sending

    In a hybrid deployment, mail can leave through Exchange Online, through an on-premises server, or through both depending on the connector. Each path needs its own authorisation:

    • SPF — add the on-premises public IPs with ip4: mechanisms. If the range is large or changes, this is where the 10-lookup budget becomes a real design constraint.
    • DKIM — Exchange Online signs at the point of egress. Mail relayed through on-premises infrastructure without passing through the service may leave unsigned.
    • Headers — a relay can rewrite the envelope sender. Check a real message with the Header Analyzer rather than assuming the path.

    Do not simply widen SPF until things pass. If a relay is rewriting the envelope domain to something you do not control, SPF cannot succeed no matter what you publish, and the fix belongs in the connector configuration.

    DKIM key rotation without an outage

    Microsoft 365 publishes two selectors so rotation can happen without a gap. The pattern is the same one used by virtually every DKIM implementation:

    1. Both selectors are published and resolvable. One signs, the other is idle or holds the previous key.
    2. To rotate, generate a new key on the idle selector and publish it. Wait for DNS propagation across the record's TTL.
    3. Switch signing to the new selector. Mail signed by the old selector still verifies because its public key remains published.
    4. After the maximum verification window has passed, retire the old key and reuse that selector for the next rotation.

    Rotating immediately after a compromise is different: publish the new key, switch signing at once, and accept that in-flight mail signed with the old key may fail. Verify the new key with the DKIM Checker before and after the switch.

    Subdomain governance with sp=

    By default, a subdomain inherits the parent's p= policy. That is usually too blunt. If marketing.example.com is delegated to an ESP that is not fully authenticated, a single parent policy of reject will silently kill those campaigns.

    Publish a separate DMARC record on the subdomain, or use sp= on the parent to set a different subdomain policy. Subdomains that send nothing at all should carry an explicit v=DMARC1; p=reject of their own — this is the cheapest defence against spoofing of a name you never use.

    Multiple verified domains in one tenant

    Each verified domain is authenticated independently. Enabling DKIM for one does not enable it for another, and a tenant can easily end up with three domains, two of which are signing and one of which is quietly failing. Audit per domain, not per tenant:

    • Confirm SPF per domain with the SPF Checker.
    • Confirm each DKIM selector with the DKIM Checker.
    • Confirm the published policy per domain with the DMARC checker.
    • Run the combined view in the Email Health check to catch the domain you forgot.

    FAQ

    Can I use -all with a hybrid relay?

    Yes, provided every egress IP is authorised. The risk is not -all itself but an incomplete list — a relay added later without updating SPF will fail hard.

    Does DKIM rotation require a DNS outage window?

    No. Publishing the new key before switching signing is what makes rotation seamless. The outage pattern only appears when both steps happen at once.

    Should every subdomain have its own DMARC record?

    Every subdomain that sends should. Every subdomain that never sends should have a reject policy anyway, to prevent someone else using it.

    Was this guide helpful?

    Microsoft 365 SPF & DKIM Advanced Setup - EmailToolBox