Email Authentication: Implementing DMARC, SPF, and DKIM for Email Security
Jean-Vincent QUILICHINI
The CFO's email looked legitimate—same name, same signature, same domain. The urgent wire transfer request seemed unusual, but the finance team complied. Hours later, the real CFO denied sending any such request. Attackers had spoofed the company's domain, and $450,000 was gone. Email authentication could have stopped this attack before it reached the inbox.
Why Email Authentication Matters
Email was designed without built-in sender verification. Anyone can claim to send email from any domain. This fundamental weakness enables:
- Business Email Compromise (BEC): Impersonating executives to authorize fraudulent transactions.
- Phishing attacks: Spoofing trusted brands to steal credentials.
- Brand damage: Criminals using your domain for spam and scams.
- Deliverability issues: Unauthenticated email increasingly blocked by providers.
Email authentication protocols—SPF, DKIM, and DMARC—address these vulnerabilities.
Understanding the Authentication Triad
SPF (Sender Policy Framework)
SPF specifies which mail servers are authorized to send email for your domain.
How it works:
- Domain owner publishes SPF record in DNS.
- Record lists authorized sending IP addresses.
- Receiving server checks if sender IP matches SPF record.
- Messages from unauthorized IPs can be rejected or flagged.
Example SPF record:
v=spf1 ip4:192.168.1.0/24 include:_spf.google.com -all
Limitations:
- Only validates the envelope sender (Return-Path), not the From header users see.
- Breaks when email is forwarded.
- IP-based approach doesn't scale well with cloud services.
DKIM (DomainKeys Identified Mail)
DKIM adds a digital signature to outgoing emails, proving the message hasn't been altered.
How it works:
- Sending server signs email with private key.
- Public key published in DNS for verification.
- Receiving server verifies signature against public key.
- Invalid signatures indicate tampering or spoofing.
Example DKIM record:
selector._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSq..."
Benefits:
- Survives forwarding (signature stays with message).
- Validates message integrity, not just sender.
- Supports multiple signing domains and selectors.
DMARC (Domain-based Message Authentication, Reporting, and Conformance)
DMARC ties SPF and DKIM together and tells receivers what to do with failures.
How it works:
- Domain owner publishes DMARC policy in DNS.
- Policy specifies handling of authentication failures.
- Receiving servers send reports about authentication results.
- Domain owners gain visibility and control over email.
Example DMARC record:
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; pct=100"
Policy options:
- none: Monitor only, don't affect delivery.
- quarantine: Send failures to spam folder.
- reject: Block messages that fail authentication.
Implementing Email Authentication
Phase 1: Discovery and Assessment
Before implementing, understand your email ecosystem:
- Inventory all sending sources: Marketing platforms, CRM, ticketing systems, applications.
- Document legitimate senders: IPs and services authorized to send as your domain.
- Review current records: Check existing SPF, DKIM, and DMARC configurations.
- Baseline metrics: Current email deliverability and authentication rates.
Phase 2: SPF Implementation
Deploy SPF records systematically:
- List all authorized senders: Compile IP addresses and include mechanisms.
- Create SPF record: Build record covering all legitimate sources.
- Test before publishing: Validate syntax and coverage.
- Publish record: Add TXT record to DNS.
- Monitor results: Watch for delivery issues from missed senders.
Best practices:
- Keep records under 10 DNS lookups to avoid failures.
- Use
~all(softfail) initially, then move to-all(hardfail). - Regularly audit and remove unused include statements.
Phase 3: DKIM Implementation
Configure DKIM signing:
- Generate key pairs: Create private and public keys.
- Publish public key: Add DKIM record to DNS.
- Configure signing: Enable DKIM on mail servers and services.
- Test signature: Verify emails are properly signed.
- Monitor validation: Track DKIM pass rates.
Best practices:
- Use 2048-bit keys minimum for security.
- Implement key rotation procedures.
- Configure all sending services with DKIM.
Phase 4: DMARC Deployment
Roll out DMARC progressively:
- Start with monitoring:
p=noneto collect reports without affecting delivery. - Analyze reports: Identify legitimate senders failing authentication.
- Fix authentication issues: Update SPF and DKIM for identified sources.
- Increase enforcement: Move to
p=quarantinethenp=reject. - Maintain ongoing monitoring: Continue reviewing reports.
DMARC record components:
p: Policy for organizational domain.sp: Policy for subdomains.rua: Address for aggregate reports.ruf: Address for forensic reports.pct: Percentage of messages to apply policy.
Reading DMARC Reports
Aggregate Reports (RUA)
Daily summaries showing:
- Volume of email from your domain.
- Authentication pass/fail rates.
- Sending IP addresses.
- Which policies were applied.
Forensic Reports (RUF)
Individual failure reports including:
- Full message headers.
- Authentication results.
- Specific failure reasons.
Note: Many receivers don't send forensic reports due to privacy concerns.
Common Implementation Challenges
Third-Party Senders
Many services send email on your behalf:
- Marketing platforms: Mailchimp, HubSpot, Marketo.
- Transactional services: SendGrid, Mailgun, AWS SES.
- CRM systems: Salesforce, Zoho.
- Support platforms: Zendesk, Freshdesk.
Solutions:
- Add their servers to SPF records.
- Configure DKIM signing with your domain.
- Use subdomain delegation for easier management.
Forwarding and Mailing Lists
Email forwarding breaks SPF:
- Original sender IP no longer matches.
- Forwarded message fails SPF check.
Solutions:
- Rely on DKIM (survives forwarding).
- Implement ARC (Authenticated Received Chain) for forwarding services.
Legacy Systems
Older systems may not support modern authentication:
- Internal applications sending email.
- Legacy devices like printers and scanners.
- On-premise systems without DKIM capability.
Solutions:
- Route through authenticated relay.
- Use dedicated subdomain with relaxed policy.
- Plan for system upgrades.
How isMalicious Can Help
isMalicious complements email authentication with threat intelligence:
- Domain Monitoring: Detect lookalike domains that impersonate your brand.
- Phishing Detection: Identify domains registered to conduct phishing using your name.
- IP Reputation: Check if sending IPs are associated with malicious activity.
- Real-Time Alerts: Get notified when new domains similar to yours appear.
- API Integration: Automate domain monitoring as part of brand protection.
Beyond Authentication: Additional Protections
Brand Indicators for Message Identification (BIMI)
Display your logo next to authenticated emails:
- Requires DMARC at enforcement (quarantine or reject).
- Increases brand recognition and trust.
- Provides incentive for full authentication implementation.
MTA-STS (SMTP MTA Strict Transport Security)
Enforce encrypted email transport:
- Prevents downgrade attacks on email delivery.
- Ensures TLS encryption between mail servers.
- Complements authentication with transport security.
TLS Reporting (TLS-RPT)
Receive reports about TLS connection failures:
- Identify delivery issues due to certificate problems.
- Monitor for interception attempts.
- Complement MTA-STS deployment.
Measuring Success
Track key metrics:
- Authentication pass rates: Percentage of email passing SPF, DKIM, DMARC.
- Deliverability: Email reaching intended recipients.
- Spoofing attempts: Volume of failed authentication from unauthorized senders.
- Report coverage: Receiving reports from major providers.
Secure Your Email Domain
Email remains a primary attack vector, and domain spoofing enables some of the most damaging attacks. Implementing SPF, DKIM, and DMARC protects your organization and your partners from email impersonation. Combined with domain monitoring from isMalicious, you can detect both technical spoofing and lookalike domain attacks.
Start your email authentication journey today. Begin with SPF, add DKIM, deploy DMARC in monitoring mode, and progressively increase enforcement. Your domain reputation—and your stakeholders' security—depends on it.
Protect Your Infrastructure
Check any IP or domain against our threat intelligence database with 500M+ records.
Try the IP / Domain Checker