Complete DMARC Implementation Guide
Everything you need to implement DMARC from scratch. This comprehensive guide covers SPF, DKIM, DMARC configuration, report analysis, and progressive enforcement rollout from p=none to p=reject.
Table of Contents
Overview: What You'll Accomplish
By the end of this guide, you will have:
Prerequisites & Planning
What You'll Need
Discovery Phase: Identify All Email Sources
Before starting, create a comprehensive inventory of all systems that send email using your domain:
- Primary email servers (Exchange, Gmail Workspace, Office 365)
- Marketing platforms (Mailchimp, SendGrid, Constant Contact)
- Transactional email services (Postmark, Mandrill, Amazon SES)
- CRM systems (Salesforce, HubSpot, Pipedrive)
- Support desk software (Zendesk, Freshdesk, Intercom)
- E-commerce platforms (Shopify, WooCommerce, Magento)
- Internal applications (custom apps, monitoring alerts)
- Forwarding rules (any email forwarding or redirects configured)
Phase 1: Configure SPF (Week 1)
SPF (Sender Policy Framework) authorizes which IP addresses can send email on behalf of your domain.
Step 1: Build Your SPF Record
Start with the basic structure:
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all
Step 2: Add All Email Sources
Common third-party SPF includes:
| Service | SPF Include |
|---|---|
| Google Workspace | include:_spf.google.com |
| Microsoft 365 | include:spf.protection.outlook.com |
| SendGrid | include:sendgrid.net |
| Mailchimp | include:servers.mcsv.net |
| Zendesk | include:mail.zendesk.com |
Step 3: Watch the 10 DNS Lookup Limit
include: counts as 1 lookup, plus any nested lookups within those includes.Use our SPF Surveyor tool to verify your record stays under the limit.
Step 4: Deploy SPF Record
- Add TXT record at your domain root (yourdomain.com)
- Wait 5-60 minutes for DNS propagation
- Verify with:
dig yourdomain.com TXT - Test by sending emails and checking headers
Phase 2: Implement DKIM (Week 2)
DKIM (DomainKeys Identified Mail) adds cryptographic signatures to your emails, proving they haven't been tampered with.
Step 1: Generate DKIM Keys
Generate a 2048-bit RSA key pair for each email source:
# Generate DKIM key pair openssl genrsa -out dkim_private.pem 2048 openssl rsa -in dkim_private.pem -pubout -out dkim_public.pem
Step 2: Configure Email Server
Add the private key to your email server configuration. For common platforms:
- Google Workspace: Admin Console → Apps → Google Workspace → Gmail → Authenticate email
- Microsoft 365: Exchange Admin Center → Mail Flow → DKIM
- Postfix: Configure OpenDKIM with your private key
Step 3: Publish DNS Records
Add TXT record at: selector._domainkey.yourdomain.com
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
Common selector names: default, google, selector1, k1
Step 4: Verify DKIM Signing
- Send a test email to yourself
- View the email source/headers
- Look for
DKIM-Signature:header - Verify with our DKIM Inspector tool
Phase 3: Deploy DMARC p=none (Week 3-4)
Start with monitoring mode to collect data without affecting email delivery.
Create Your First DMARC Record
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; ruf=mailto:forensic@yourdomain.com; fo=1
DNS Deployment
- Add TXT record at:
_dmarc.yourdomain.com - Set TTL to 300 (5 minutes) for easy testing
- Wait for DNS propagation (5-60 minutes)
- Verify with:
dig _dmarc.yourdomain.com TXT
Automate Your DMARC Implementation
Let TrustYourInbox handle the heavy lifting: automated report analysis, progressive enforcement, and 24/7 monitoring.
Start Free TrialNeed Expert Help?
Our DMARC specialists can handle your entire implementation, from audit to p=reject.
Talk to an Expert