Key takeaways
- Confirm SPF and DKIM already pass for mail from the domain, because DMARC relies on them.
- Create a TXT record at dmarc.example.com with v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com.
- Make sure that reporting mailbox exists and can receive mail.
To set up DMARC for a domain that sends through Mailgun, publish a TXT record at `_dmarc.<your domain>` that begins `v=DMARC1` and includes a `p=` policy and a `rua=` reporting address. Mailgun's verification page does not list a DMARC record among the records it asks for, so you create this one yourself at your DNS host. Start with `p=none` so you can read the reports before you enforce anything.
Research checked: 12 November 2026
This guide covers setup. Choosing a policy for cold sending and fixing DMARC failures are covered in the other two DMARC guides.
The short answer
- Confirm SPF and DKIM already pass for mail from the domain, because DMARC relies on them.
- Create a TXT record at `_dmarc.example.com` with `v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com`.
- Make sure that reporting mailbox exists and can receive mail.
- Check the record with `dig`, then read the first aggregate reports before changing `p=`.
Setup steps
Step 1: Check what DMARC will evaluate
DMARC does not authenticate mail on its own. RFC 7489 says a message satisfies DMARC when at least one supported mechanism, SPF or DKIM, produces a pass whose domain aligns with the visible From domain. Before you publish a policy, confirm that both Mailgun records are verified, using Mailgun's domain verification guide and the SPF and DKIM guides in this series. A DMARC record on top of unverified records only produces failure reports.
Write down your sending sources before you start. Typical ones are Mailgun, your mailbox provider, a CRM and any warm-up tool. Each one must appear in your reports later, or you will not know which source is failing.
Step 2: Write the record
The minimum useful record is:
``` _dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com" ```
The tags work as follows:
- `v=DMARC1` must be first.
- `p=none` asks receivers to take no action on failing mail, but still send reports.
- `rua=` names where aggregate reports go. It is a comma-separated list of `mailto:` addresses.
RFC 7489 also defines `ruf=` for per-message failure reports, but not every receiver sends them, so `rua=` is the tag to rely on. The RFC's `pct=` tag controls what share of mail the policy applies to; leave it out at the start, which means the policy applies to all mail.
Step 3: Make the reporting address work
Receivers send aggregate reports as XML, typically attached to an email, and the schedule is set by each receiver rather than by you. The `rua=` mailbox must exist and accept mail. If you point reports at a domain that is not set up to receive them, the reports are lost and you will not know it. Use a mailbox you read, or a reporting service you have chosen deliberately.
Step 4: Verify the record
``` dig +short TXT _dmarc.example.com ```
The output should be one line that starts `"v=DMARC1;` and contains your `p=` and `rua=` tags. If you get no answer, check that the name is `_dmarc` and not `dmarc` under the domain. If you get two records, delete one, because DMARC uses one record per domain.
Read the reports, then tighten
Leave `p=none` in place until the reports show your legitimate senders aligning. Each report lists the sending IPs and whether SPF and DKIM passed with an aligned domain. Find every legitimate source, including Mailgun, and fix any that fail before changing the policy. If one source fails across several reporting days, treat that as a configuration fault to fix, not noise to ignore. Move to `p=quarantine` or `p=reject` only after that review.