What do SPF, DKIM and DMARC each do?
| Record | DNS type | What it proves |
|---|---|---|
| SPF | TXT on your domain | The sending server is allowed to send for your domain |
| DKIM | TXT under a _domainkey name | The message was signed with your key and not changed on the way |
| DMARC | TXT on _dmarc | SPF or DKIM passes and matches your From domain; sets the policy and where reports go |
Receivers such as Gmail check them on every message. A missing or failing record is a common reason mail lands in spam or bounces.
How do I add them by hand on Cloudflare?
- Check whether
_dmarcalready has a record. If it has none, Cloudflare addsv=DMARC1; p=reject;when you onboard the domain, and any other service that sends as your domain without alignment gets refused. - Add the domain to Cloudflare Email Sending. The dashboard shows the DNS records for it.
- Add the SPF and DKIM records to the zone under DNS, exactly as shown, and wait for verification.
- If other services send as your domain, add a DMARC record that only monitors before you add the domain in step 2, so Cloudflare keeps it instead of adding its own:
Start with p=none and read the reports. Once real mail passes, move to quarantine and then reject. If nothing else sends as the domain, such as a new domain or a sending subdomain, keep Cloudflare's p=reject.
How does my agent do it?
Cloudflare shows you the records and leaves the copying to you. Resend has an Auto configure button that signs in to your DNS provider. sendmcp runs inside your Cloudflare account, so your agent writes the records over MCP with no sign-in step, and it also writes DMARC and the tracking CNAME.
| Step | Tool |
|---|---|
| Add the domain and write SPF, DKIM, DMARC and the tracking CNAME | domains_add |
| Check that the records resolve | domains_verify, domains_dns_records |
| Check DNS, DMARC policy, suppression count and complaint rate | deliverability_check |
| Send a test and read the result | emails_send_test, events_list |
Alignment is checked on the test send, not only in DNS.
Which DMARC policy should I use?
p=none reports and blocks nothing. quarantine sends failing mail to spam, and reject refuses it. deliverability_check shows the policy for each domain, so your agent can tell you which ones are still on none.
sendmcp picks the starting policy from what is already in your zone:
| Your domain | What sendmcp does |
|---|---|
| Has a DMARC record | Leaves it as it is |
No DMARC record, and other services send as it (MX records or other include: entries in SPF) | Writes p=none with reports to you before onboarding, so Cloudflare does not add p=reject |
| No DMARC record, and nothing else sends as it | Keeps Cloudflare's p=reject |
On a domain that starts at p=none, deliverability_check reads the reports. When every sender passes with alignment, your agent suggests quarantine, then reject. It never changes the policy without asking.
Sources
- Cloudflare: Email Service docs checked
- Resend docs checked