Learn how to configure DMARC, DKIM, and SPF to reduce Business Email Compromise risk with a clear, step-by-step admin guide tailored for modern environments, so you can implement robust email authentication, achieve policy enforcement without breaking legitimate mail, and protect brand trust while maintaining deliverability.
Why DMARC, DKIM, and SPF matter for BEC prevention
Business Email Compromise thrives on spoofed identities, lookalike domains, and unauthorized senders. DMARC, DKIM, and SPF work together to verify the domain in the visible From header, authenticate messages, and instruct receivers to quarantine or reject failures.
- SPF authorizes sending hosts for a domain’s envelope sender.
- DKIM cryptographically signs messages so receivers can validate content integrity and domain identity.
- DMARC ties alignment of the From domain to SPF and DKIM results, and defines enforcement policies.
Preparation: Inventory, risk assessment, and DNS readiness
Inventory all domains and sending sources
List every domain you own, including primary, subdomains, parked domains, and legacy names. Map each sending source that uses your domains, such as Microsoft 365, Google Workspace, CRM platforms, marketing tools, ticketing systems, and transactional services.
- Classify domains by usage: active mail-sending, relay-only, or no-mail.
- Identify third-party platforms and their documentation for SPF and DKIM.
- Record DNS hosting providers and access rights for each domain.
Establish change control and monitoring
Plan a staged rollout with testing windows. Assign owners for DNS changes and email platform settings. Prepare to monitor DMARC aggregate reports to validate coverage, find unauthorized senders, and tune alignment safely.
DNS prerequisites
Confirm you can add and update TXT records at the root domain and relevant subdomains. Ensure TTLs are manageable during rollout so changes propagate quickly without creating instability.
SPF record configuration for BEC prevention
Create or review the SPF record
Add a single TXT record at the root of each sending domain. Avoid multiple SPF records for the same name, as that breaks parsing.
- Start with a minimal baseline: v=spf1 followed by ip4, ip6, and carefully selected include mechanisms for each approved sender.
- Use ~all during discovery, then move to -all when confident in coverage.
- Respect the 10-DNS-lookup limit for SPF. Each include, mx, and exists counts toward the limit.
SPF best practices that reduce BEC risk
- Flatten vendor includes only when necessary and with automation, to avoid drift.
- Prefer explicit ip4 and ip6 for in-house infrastructure.
- Avoid ptr, which is discouraged and unreliable.
- Delegate sending to subdomains for specific services, keeping the root domain stricter.
- For non-sending domains, publish a restrictive record such as v=spf1 -all.
DKIM setup with strong keys and alignment
Generate DKIM keys and selectors
Enable DKIM on each platform that sends on your behalf. Use distinct selectors per platform to support rotation and isolation.
- Use 2048-bit keys where supported for stronger security.
- Publish the public key in a TXT record at selector._domainkey.example.com.
- Rotate keys on a routine schedule and during vendor transitions.
Signing strategy and deliverability
Choose relaxed canonicalization for typical interoperability. Sign headers that remain stable across intermediaries, such as From, Date, Subject, and Message-ID. Ensure the DKIM d= domain aligns with the visible From domain for DMARC to pass via DKIM.
- Do not rely on a single platform’s signing if multiple systems send mail.
- Test DKIM on staging traffic before global enablement.
- Retire old selectors once mail flow has fully switched to new keys.
DMARC configuration: Monitor, tune, and enforce
Create the initial DMARC record
Start with a monitoring policy to observe your ecosystem without affecting delivery. Publish at _dmarc.example.com a TXT record with policy none and an aggregate reporting address you control.
- Baseline example: v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; fo=1; adkim=r; aspf=r.
- Use fo=1 to request failure details in aggregate form. Forensic reports may contain sensitive data; enable them only if required and with safeguards.
- Set an appropriate ri interval if your reporting volume is high.
Analyze DMARC aggregate reports
Review who is sending on your behalf, which paths pass or fail SPF and DKIM, and whether alignment succeeds. Look for unauthorized sources, misconfigured vendors, and forwarding-induced failures.
- Confirm every legitimate sender either aligns on SPF or DKIM.
- Fix alignment by adjusting the envelope sender, DKIM d= domain, or using aligned subdomains.
- Work with vendors to activate DKIM and publish correct SPF includes.
Move to enforcement without breaking mail
After coverage is confirmed, transition cautiously to quarantine, then reject. Use the pct tag to ramp up enforcement gradually.
- Intermediate example: v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@example.com; adkim=s; aspf=s.
- Final enforcement: v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com; sp=reject; adkim=s; aspf=s.
- Use sp to enforce policy on subdomains consistently, particularly for parked or unused subdomains.
External reporting authorization
If you send DMARC reports to a third-party service, ensure the provider publishes the required external reporting authorization record per the DMARC specification. This typically appears as a TXT record under yourdomain._report._dmarc.providerdomain and confirms permission to receive your reports.
Platform-specific notes: Microsoft 365, Google Workspace, and cloud senders
Microsoft 365 DMARC, DKIM, and SPF
Publish Microsoft 365 SPF includes only once and ensure no duplicate records exist. Turn on DKIM in the admin center, create the two CNAME or TXT records for selectors, and enable signing. Align the From domain with the DKIM d= domain for DMARC to succeed.
- Use a dedicated subdomain for third-party apps that send via Microsoft 365.
- Verify that transport rules or connectors do not rewrite headers that affect alignment.
Google Workspace email authentication
Enable DKIM signing in the admin console, using a 2048-bit key where supported. Publish the selector’s TXT record and wait for propagation before enabling signing. Confirm SPF includes for outbound routing and any additional services.
- Review routing rules and gateway settings that might modify headers.
- Use a consistent From domain for services that must align with DKIM.
Cloud services and marketing platforms
For providers such as transactional email services or marketing tools, follow their documented steps to add SPF includes and publish DKIM selectors. Delegate a subdomain like mail.example.com so vendors can align DKIM and minimize risk to the apex domain.
- Prefer DKIM alignment for vendors that manage their own IPs.
- Set clear offboarding steps to remove includes and revoke selectors when vendors change.
Handling forwarding, mailing lists, and edge cases
Forwarding and alignment breaks
Traditional forwarding can break SPF because the envelope sender is preserved while the connecting IP changes. Prioritize DKIM alignment so forwarded messages still pass DMARC via DKIM.
- Where supported, ARC can help preserve authentication through intermediaries.
- Encourage partners to forward using mechanisms that maintain DKIM signatures.
Mailing lists and content modifications
Mailing lists often modify Subject or body, invalidating DKIM. Many list managers support DMARC-friendly behavior such as From rewriting. Evaluate these settings for subscribed lists.
- Prefer DKIM alignment for list traffic that remains unmodified.
- Consider subdomain segregation for list participation to isolate impact.
Securing parked and non-sending domains
Lock down unused domains
Parked domains are prime targets for spoofing. Publish restrictive records to prevent abuse while signaling receivers to reject impersonation attempts.