
DMARC problems rarely look like a simple “bounce.” They surface later. Invoices don’t arrive, password resets land in spam, or Gmail/Yahoo quietly drop messages with no clear warning.
This DMARC reporting tutorial shows how to add DMARC to a VPS-hosted email domain, enable reporting, and use the results to fix SPF/DKIM alignment. You’ll do it without breaking legitimate outbound mail.
What you’ll build (and what you need)
You’ll publish a DMARC DNS record, start with a safe policy, and begin receiving aggregate DMARC reports (RUA).
If it fits your risk and privacy posture, you can also enable forensic reports (RUF). Those can provide deeper failure signals.
Next, you’ll validate alignment for the senders that matter. That usually includes your VPS MTA (Postfix/Exim), WordPress, and any third-party platforms sending on your behalf.
- Access: DNS control for your domain (your registrar DNS or a DNS provider)
- Mail setup: VPS mail server (Postfix/Exim) or cPanel/WHM mail, plus outbound sources (apps, WordPress, SMTP relay)
- Time: 30–60 minutes, then 24–72 hours for reports to populate
If you manage several domains, or you want a clean baseline without chasing server-level mail quirks, a managed VPS hosting plan can save you a lot of log-diving and guesswork.
Step 1: Audit your real senders before you touch DMARC
DMARC checks whether the domain people see in “From:” matches the domain authenticated by SPF and/or DKIM.
If you publish a DMARC policy before you understand your senders, you can block your own mail.
Start with a plain list of everything that sends as @yourdomain.com:
- Your VPS mail server (Postfix/Exim/cPanel Exim)
- Website and apps (WordPress contact forms, WooCommerce, cron reports)
- Third-party senders (ticketing tools, newsletters, CRM)
- Forwarders and aliases (less common for DMARC issues, but still worth checking)
Two quick checks before you do anything else:
- SPF record present? Look for a TXT record at the root:
v=spf1 ... - DKIM enabled? cPanel/WHM typically publishes DKIM automatically; Postfix usually needs OpenDKIM or an outbound relay that signs.
If you still need DKIM on a VPS mail stack, follow HostMyCode’s guide: DKIM setup tutorial for Postfix + OpenDKIM.
Step 2: Pick a DMARC report mailbox (RUA) that won’t melt
Aggregate DMARC reports arrive as XML, often from many large receivers. Once reporting starts, even a small domain can get a steady daily stream.
Don’t route these into a normal inbox.
Two practical approaches:
- Create a dedicated mailbox:
dmarc-reports@yourdomain.com(simple, but you’ll manage storage and junk) - Use a report processor: a service that parses XML into dashboards (usually the lowest-effort option)
If you host the mailbox yourself, set a generous quota and watch disk usage.
In WHM setups, report mailboxes often fill quietly. Later, you may see quota warnings that look unrelated.
Step 3: Publish a safe DMARC record (monitoring mode)
DMARC lives at _dmarc.yourdomain.com as a TXT record.
Start with monitoring mode. You want visibility first, not delivery changes.
Recommended starting record (monitor only):
Host/Name: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; adkim=s; aspf=s; fo=1; pct=100
What the tags mean in practice:
p=none— no quarantining or rejecting yet; collect data firstrua=mailto:...— destination for aggregate reports (RUA)adkim=sandaspf=s— strict alignment; misconfigured sources surface quicklyfo=1— request failure reports where receivers support them (not guaranteed)pct=100— apply the policy to all mail (safe here becausep=none)
If strict alignment generates too much noise on day one, temporarily switch to adkim=r; aspf=r (relaxed) while you clean up senders.
Treat that as a short-term bridge, not the final setting.
After publishing, confirm the public record:
dig +short TXT _dmarc.yourdomain.com
If you’re changing records during a migration, lower TTL first so updates propagate quickly.
This pairs well with HostMyCode’s DNS planning guide: DNS TTL reduction tutorial.
Step 4: Verify SPF and DKIM alignment (the part that actually fixes delivery)
DMARC passes if at least one aligned authentication method succeeds:
- SPF passes and SPF aligns with the From domain
- DKIM passes and DKIM aligns with the From domain
“Alignment” means the authenticated domain matches the domain recipients see in the From address.
It can also match under your alignment policy.
Common alignment failures you’ll see in reports:
- WordPress sends as
wordpress@servernameor uses a weird envelope sender - A third-party tool uses “From: yourdomain.com” but signs DKIM with its own domain
- SPF passes for a provider domain, but the visible From is your domain (pass without alignment)
For WordPress and app mail, the clean fix is an authenticated SMTP route.
If you need a working pattern for that, see: SMTP relay setup guide tutorial.
Step 5: (Optional) Add RUF forensic reports carefully
Forensic reports (RUF) can include message headers. That can trigger privacy and data-handling requirements.
Many large providers also send RUF reports inconsistently. Enable RUF only if you have a specific incident-response reason to collect them.
If you do enable RUF, use a dedicated address and declare the format:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; ruf=mailto:dmarc-forensic@yourdomain.com; rf=afrf; fo=1
If your organization handles regulated data, keep RUF off and rely on RUA plus server logs.
Step 6: Wait for reports, then read one like an admin
Most receivers send aggregate reports once per day. Wait at least 24 hours after publishing.
Reports usually arrive as an XML attachment. They’re often gzip-compressed.
On a Linux server, you can unpack and inspect one quickly:
# Example: extract and view
mkdir -p ~/dmarc
cp /path/to/report.xml.gz ~/dmarc/
cd ~/dmarc
gzip -d report.xml.gz
less report.xml
Fields worth scanning first:
source_ip— the sender IP the receiver observedcount— number of messages from that IPpolicy_evaluated— pass/fail plus dispositiondkimandspfresults — including alignment indicators in some reportsheader_from— the From domain DMARC evaluated
Quick read: if a report shows a high message count from an IP you don’t recognize, assume misrouting first (common).
But keep spoofing on the table. DMARC reporting is meant to make both visible.
Step 7: Fix the two most common causes of DMARC failure
Most failures boil down to two patterns: mail exits through the wrong path, or it authenticates as the wrong domain.
Fix those first. Everything else gets easier after that.
Fix A: Your website sends through PHP mail() (no consistent authentication)
When WordPress uses PHP mail(), SPF results are often inconsistent and DKIM is usually missing.
Move site mail to SMTP (your VPS MTA or a trusted relay). Then set a real From address on your domain.
- Set WordPress From address to
no-reply@yourdomain.com(or a monitored mailbox) - Use authenticated SMTP and TLS
- Make sure the relay signs DKIM for
yourdomain.com(alignment)
Fix B: A third-party sends “From: you@yourdomain.com” but authenticates as them
This is common with marketing platforms and ticketing systems.
Fix it by configuring the provider to sign DKIM as your domain.
Providers often label this “domain authentication” or “bring your own domain.”
Once the provider publishes a DKIM selector under your domain, DMARC alignment usually falls into place.
If the provider can’t sign with your domain, don’t use your domain in the visible From.
Use their domain in From and your domain in Reply-To. Or move that mail stream to a provider that supports aligned DKIM.
Step 8: Move from monitoring to enforcement (quarantine → reject)
After a few days of reports and cleanup, you can enforce DMARC. Take it in steps.
The goal is to block spoofing without blocking legitimate senders you forgot about.
Phase 1: quarantine at 25%
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@yourdomain.com; adkim=s; aspf=s
Watch reports for 48–72 hours. If a legitimate source still fails, fix that source.
Don’t “solve” it by loosening alignment just to improve the pass rate.
Phase 2: quarantine at 100%
v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc-reports@yourdomain.com; adkim=s; aspf=s
Phase 3: reject at 100% (strongest protection)
v=DMARC1; p=reject; pct=100; rua=mailto:dmarc-reports@yourdomain.com; adkim=s; aspf=s
Many business domains ultimately land on p=reject. It’s also where mistakes hurt.
Change one thing at a time, and keep a rollback plan ready (lower policy plus a shorter TTL).
Step 9: Add a DMARC record for subdomains (or explicitly opt out)
Control subdomain behavior with sp=.
If subdomains send mail (for example, billing.yourdomain.com), set an explicit policy instead of guessing.
Example: enforce reject for subdomains too
v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc-reports@yourdomain.com; adkim=s; aspf=s
If you never intend subdomains to send mail, enforcement helps catch accidental “From” usage early.
Step 10: Validate from the command line (fast checks)
Receivers evaluate DMARC, not your server. Even so, you can validate the inputs quickly.
Focus on DNS records and the DKIM/SPF plumbing your mail depends on.
Check DMARC TXT:
dig +short TXT _dmarc.yourdomain.com
Check SPF TXT at root:
dig +short TXT yourdomain.com | grep spf
Check DKIM selector record (example selector: default):
dig +short TXT default._domainkey.yourdomain.com
If you run cPanel, certificates still matter to the mail experience.
A broken cert won’t directly fail DMARC, but it will break client trust.
That can ripple into delivery and authentication workflows. If renewals are failing, this guide helps: cPanel AutoSSL troubleshooting tutorial.
Troubleshooting: DMARC reports show fails, but you “know” mail is fine
- Reports show an unknown IP: check if it’s your server’s IPv6, a load balancer, or a relay. Also verify rDNS for your outbound IPs.
- SPF passes but DMARC fails: SPF domain probably doesn’t align with the From domain. Fix the envelope sender or rely on DKIM alignment.
- DKIM passes but DMARC fails: DKIM is signing with the wrong domain. Your provider may be signing with their domain instead of yours.
- Nothing arrives at RUA mailbox: confirm the mailbox exists, accepts mail, and that your DMARC TXT has no syntax errors (missing semicolons is a classic).
For deeper, hosting-safe diagnostics across mail ports, risky services, and DNS exposure, keep a repeatable audit checklist: VPS security audit tutorial.
Operational checklist (copy/paste)
- Create
dmarc-reports@(or sign up for a report processor) and verify it receives mail. - Publish DMARC with
p=none, strict alignment, and RUA enabled. - Confirm SPF exists and includes all legitimate senders.
- Confirm DKIM signing for your domain on every sender (VPS MTA, apps, third parties).
- Review reports for 2–7 days; fix sources one by one.
- Roll forward:
quarantineat 25% → 100% →reject. - Set
sp=if subdomains send mail (or to prevent them from doing so).
Summary: DMARC is a feedback loop, not a one-time DNS change
DMARC works best as a cycle: publish a cautious record, read the reports, fix alignment, then tighten policy.
Once you reach p=reject with clean alignment, spoofed mail gets blocked.
Your legitimate mail also stops triggering “suspicious sender” treatment at major inbox providers.
If you want a stable email foundation on infrastructure you control, start with a HostMyCode VPS so you can set DNS, mail authentication, and logging cleanly from day one.
If you host email alongside websites, DMARC is easier when your server, DNS, and SSL process are consistent. HostMyCode can help you run authenticated mail on a VPS and keep the supporting pieces (TLS, updates, monitoring) in good shape. Consider managed VPS hosting if you want policy tightening and deliverability checks handled with you, instead of after something breaks.
FAQ
How long does it take to start getting DMARC reports?
Usually 24–48 hours after publishing rua=. Many receivers send reports daily, but some send less often.
If nothing arrives after 72 hours, recheck the DMARC syntax and confirm the mailbox can receive mail.
Should I start with p=reject?
No, unless you’re certain every sender aligns.
Start with p=none, fix alignment based on reports, then move to quarantine and finally reject.
What’s the difference between SPF/DKIM “pass” and DMARC “pass”?
SPF/DKIM “pass” means authentication succeeded. DMARC “pass” means authentication succeeded and aligned with the From domain your recipients see.
Do I need RUF forensic reports?
Most small and mid-sized domains don’t. RUA aggregate reports usually provide enough signal to spot misconfigured senders and spoofing attempts.
Use RUF only if you have an incident-response need and you can handle the privacy implications.
Can DMARC fix email deliverability by itself?
DMARC helps receivers trust your domain by reducing spoofing and enforcing consistent authentication.
You still need clean SPF/DKIM, correct rDNS, and sensible sending practices to keep inbox placement stable.