Mailgun email configuration guide
Mailgun: SPF record for provider sending
SPF checks the Mailgun envelope MAIL FROM domain, which may be a subdomain and may differ from the visible From address.
A provider setup symptom may look like:
SPF record for provider sending after a provider DNS change.
What this usually means
The SPF policy at the Mailgun envelope domain is missing, duplicated, or does not authorize the Mailgun sending route.
Fix it
- Open the exact sending domain in Mailgun and copy its current SPF requirement.
- Read a failed or delivered message header to identify the envelope MAIL FROM or Return-Path domain.
- At that DNS name, keep one TXT record beginning with
v=spf1and merge Mailgun’s mechanism with other legitimate senders. - Do not place the record only at the visible From domain if Mailgun evaluates a dedicated subdomain.
- Publish it, ask Mailgun to verify again, and confirm
spf=passin a new message.
Common mistake
Two SPF records cause a permanent evaluation error. A correct SPF record at the wrong domain is still irrelevant to the message Mailgun sent.
What MailFixIt can check
MailFixIt can trace the public SPF policy and show authorization for resolved sending IPs. It cannot prove Mailgun account state without a new message.
Related troubleshooting
Use the related SPF guides for subdomain, include, syntax, or lookup-limit failures.
Frequently asked questions
What does MailFixIt check for Mailgun?
It can find duplicate policies, syntax errors, failing includes, and visible authorization. The message header is needed to confirm which envelope domain Mailgun used.
Should I replace every existing DNS record with the provider values?
No. Confirm the exact record type and owner, preserve unrelated legitimate services, and change only the provider-controlled record required for the intended mail route.
Related email diagnostics
Primary sources: Mailgun official setup guidance.