DMARC ties the two technical checks to the address people actually see. A message passes DMARC if at least one of these is true:
- SPF passes and the envelope sender domain (
smtp.mailfrom, the Return-Path) matches the From domain; - DKIM passes and the signing domain (
d=/header.d) matches the From domain.
“Matches” means alignment. With the default relaxed mode, a subdomain such as mail.example.com counts as example.com; with strict mode (aspf=s, adkim=s) it must be identical. The policy in brackets, p=REJECT for example, tells you what the receiver was asked to do with failing mail.
Causes
- A third-party service sends as your domain: a newsletter tool, CRM, helpdesk or store platform that uses its own bounce domain and signs with its own DKIM key.
- SPF is broken, for example a PermError, and DKIM also fails.
- The DKIM signature fails because of a wrong key or a host change, and SPF isn’t aligned.
- Forwarding: forwarded mail fails SPF, and if the forwarder edits the message, DKIM fails too.
- A website form sends with the visitor’s address in From (a Gmail or Yahoo address), which can never align with your server.
- Spoofing: someone else is sending mail in your name. Here DMARC is doing its job.
How to fix it, step by step
-
Read the authentication line in the headers (Gmail: Show original). Note
spf=,smtp.mailfrom=,dkim=,header.d=andheader.from=. -
Compare the domains. If
smtp.mailfromandheader.dare not your From domain, the problem is alignment, not a broken record. -
Authenticate every service that sends for you. In each tool, look for “domain authentication” or “custom DKIM”. It gives you DNS records (usually CNAME or TXT) so it signs with your domain, and often a custom Return-Path.
-
Repair SPF and DKIM for your own server so direct mail passes on both.
-
Fix website forms: send from an address on your domain and put the visitor’s address in Reply-To.
-
Use the reports. A record such as the one below sends daily aggregate reports to the
ruaaddress; build yours with the DMARC generator:v=DMARC1; p=none; rua=mailto:[email protected]; adkim=r; aspf=r -
Tighten the policy gradually. When the reports show only legitimate sources and all of them pass, change
p=nonetop=quarantine, thenp=reject.
If receivers are already rejecting your mail with a message like Gmail’s 550 5.7.26, temporarily switch the policy back to p=none while you fix alignment.
Prevention
- Before connecting any new tool that sends mail as your domain, set up its domain authentication.
- Keep a list of every service allowed to send for your domain, and compare it with DMARC reports every month.
- Send bulk or marketing mail from a subdomain (for example
news.example.com) with its own records.
On ArabyHost
For domains on ns1.arabicode.com and ns2.arabicode.com, ArabyHost sets up SPF and DKIM automatically, signed and sent with your own domain, so mail from your ArabyHost mailboxes is ready to pass DMARC once you publish a record. The DMARC record itself is yours to add: create a TXT record at _dmarc in the DNS editor, starting with p=none. Services outside ArabyHost that send as your domain still need their own domain authentication.
FAQ
Why does DMARC fail when SPF and DKIM both pass?
Because they passed for another domain. If SPF passes for the newsletter service's bounce domain and DKIM is signed by the service's domain, neither matches your From domain, so DMARC fails on alignment.
Which DMARC policy should I start with?
Start with `p=none` and a `rua` address to receive reports. Once the reports show all your legitimate services passing, move to `p=quarantine`, then to `p=reject`.
Does p=none protect my domain?
It doesn't block anything; it only asks receivers to send reports. It's the right first step, but spoofed mail is only stopped once you move to quarantine or reject.