Use this when legitimate mail is rejected or spoofed mail gets through.
Email Security Troubleshooting
Troubleshoot email security by reading the message headers for SPF, DKIM and DMARC results, checking DNS records with dig, gateway quarantine and logs, TLS negotiation and DMARC aggregate reports.
send → DNS auth checks → gateway → mailbox
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
openssl s_client -starttls smtp -connect <host>:25 -servername <host>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
ReferenceWhy it matters1 section · depth on demand
Reading headers
Check Authentication-Results in the received message:
Authentication-Results: mx.example.com; spf=pass smtp.mailfrom=sender.com;
dkim=pass header.d=sender.com; dmarc=pass header.from=sender.com
Illustrative output, not captured Evidence. Then follow Received: lines bottom-up to see the path. Tools: Microsoft Message Header Analyzer, dig for SPF/DKIM/DMARC records, and DMARC aggregate reports for which sources fail.
ReferenceHow it works1 section · depth on demand
In depth
Email security troubleshooting usually starts with message headers and the mail system's message trace, which show each hop, authentication results and filtering decisions.
| Symptom | Check |
|---|---|
| Legitimate mail rejected/quarantined | DMARC/SPF/DKIM results in headers, filter verdict and reason |
| Your mail lands in recipients' spam | SPF includes all senders, DKIM signing, DMARC alignment, sending IP reputation |
| Phishing got through | Verdict details, URL detonation results, policy exceptions |
| TLS failures between servers | MTA-STS policy, certificates, TLS-RPT reports |
dig +short TXT example.com | grep spf
dig +short TXT _dmarc.example.com
Look at Authentication-Results headers first — they summarise SPF, DKIM and DMARC as evaluated by the receiving server.
ReferenceImportant terms & boundaries1 section · depth on demand
Key headers
| Header | What it shows |
|---|---|
Received | Hop-by-hop path (read bottom-up) |
Authentication-Results | SPF, DKIM, DMARC results |
Return-Path | Envelope sender (SPF domain) |
Message-ID | Unique ID for log searches |
X-MS-Exchange-Organization-SCL | Microsoft spam confidence level |
Microsoft 365: use message trace (Get-MessageTraceV2) with the Message-ID.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Email Security → Email Security Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc7489 · confidence 94%