Home/Email Deliverability/Email Authentication/How do I authenticate my email

How do I authenticate my email? The setup steps, and what an agent does

Publish SPF, DKIM and DMARC for your sending domain, in that order, then check the headers of a real message. An agent can do most of the work, but a person approves each DNS change.

VerifiedBy Kam Low, Co-founder and CTO·Updated

The short version

To authenticate your email you publish three DNS records, SPF, DKIM, and DMARC, that let receiving servers verify mail from your domain is genuine. It is the first job in any email deliverability effort, because filters weigh reputation against an identity they can verify, and email authentication is what supplies that identity. An AI agent can add the domain, hand you the exact records and verify them, but a person should approve every DNS change.

This page covers the setup steps, in order, for one sending domain. For what each record asserts, see what email authentication is.

What changes when an AI agent sets up email authentication

Ask an agent to authenticate a domain, over MCP or in code, and it will draft all three records. Speed is not the risk. The risk is a record that looks right and breaks mail the domain already sends, such as a second SPF record, DMARC at p=reject on day one, or a DKIM key at the wrong host. Each one is covered in where it goes wrong below.

An agent should verify by reading public DNS for each host name, not by trusting the DNS host's screen, which shows a record as saved before receivers can see it.

  • Work on a sending subdomain. On mail.example.com an agent can write SPF, DKIM and DMARC and check alignment without touching everyday mail on the root domain. DMARC there can move to quarantine and then reject once reports show every legitimate sender aligned and DKIM-signed.
  • Stop at quarantine on the root domain. On a domain people use for everyday mail and mailing lists, quarantine is safer, because lists rewrite messages and break alignment.

The steps

Three records. SPF and DKIM can go in either order, but DMARC comes last because it checks the other two. If the roles of the authentication protocols are not yet clear, read those first, since the steps below assume you know what each record asserts.

The three records for one sending domain

Example domain: mail.example.com
RecordHostWho supplies the valueStarting value
SPFThe sending domain itselfYou, from your list of sending sourcesOne v=spf1 record, ten DNS lookups at most
DKIMselector._domainkey on the sending domainYour sending providerThe public key the provider gives you
DMARC_dmarc on the sending domainYoup=none, with rua set to an inbox someone reads
  1. Publish an SPF record listing your sending sources, keeping under the ten-lookup limit.
  2. Enable DKIM with your sending provider and publish the keys they give you.
  3. Add a DMARC record at p=none to start, then tighten to quarantine and reject once reports show only your legitimate mail passing.
  4. Send one real test message and check its Authentication-Results header for spf=pass, dkim=pass and dmarc=pass, since a pass without alignment still fails DMARC. A spam test email adds a content check on top.

Two setup errors that block your own mail

Both of these block mail even when every record is published:

  • Jumping to p=reject before monitoring. Start at p=none, read the DMARC reports, confirm all your legitimate senders pass, then tighten. Going straight to reject blocks your own mail.
  • Assuming the records work without checking a real message. To confirm a live message passes, open a delivered copy and read its headers using the Gmail header check.

Worked example: an agent authenticates a new sending domain

The prompt: "Set up email authentication for mail.example.com so the app can send from it. Show me every DNS change before it goes live."

Before. Left unguided, an agent writes a new SPF record over the one already there, sets DMARC to p=reject, and reports success because the DNS host shows the records as saved.

After. With the Nitrosend MCP tools, the agent works through a fixed sequence:

  1. nitro_get_status reads account readiness and the current sender identity, so the agent knows whether a sending domain already exists.
  2. nitro_manage_domains adds mail.example.com as a customer sending domain, and the agent lists the DNS records the person needs to publish.
  3. A person publishes those records at the DNS host, merging the SPF include into any existing record rather than adding a second one.
  4. nitro_manage_domains verifies the domain. If one record fails, its diagnose action points to it, and the agent compares the record with what public DNS returns.
  5. nitro_configure_account sets an address on the verified domain as the default sender and keeps the person's own inbox as the test recipient.
  6. nitro_manage_template creates a short plain-text template to carry the header check.
  7. nitro_review_delivery validates the header-check template and runs its preflight. Nothing is sent at this step.
  8. nitro_send_test_message mails the template once to that inbox. The person opens the message headers and looks for spf=pass, dkim=pass and dmarc=pass in the Authentication-Results line.
  9. With all three passing, the person decides when DMARC moves off p=none, and nitro_get_insights shows delivery trends once real mail flows.

Where it goes wrong when an agent authenticates email

  • Two SPF records, so both fail. An agent told to add a new sender often writes a fresh v=spf1 record instead of adding an include to the one already there. Receivers treat more than one SPF record on a host as a permanent error (RFC 7208, section 4.5), so the old sender and the new one both lose SPF. Merge every include into one record.
  • SPF past ten DNS lookups. Each include costs lookups, and an agent that adds one for every tool it wires up can push the record over the limit of ten (RFC 7208, section 4.6.4). SPF then returns a permanent error with no warning at the DNS host. How SPF works in detail covers flattening and include chains.
  • A DKIM key at the wrong host. Many DNS hosts add the zone name to whatever is typed in the host field. An agent that pastes the full name selector._domainkey.example.com ends up with example.com added a second time, so receivers never find the key.
  • A From domain that does not match the DKIM domain. The agent verifies mail.example.com, then the code it writes sends from an old default address on another domain. DKIM passes for the signing domain, but DMARC fails because the From domain is not aligned with it.
  • DMARC reports sent to an inbox nobody reads. A model fills in rua=mailto: with a made-up or unwatched address. The reports that would show when it is safe to tighten never reach anyone, so the policy stays at p=none or gets tightened blind.

How Nitrosend does it for you

Nitrosend auto-configures DKIM, SPF and DMARC for a sending domain, as its ChatGPT integration page notes.

A filtered password reset has no second send, so the transactional email path is where a failed record hurts first. Sending through an email API does not remove the DNS work either, since the records live on your domain and the provider only supplies the keys to publish.

Over MCP the same work is a tool call. nitro_manage_domains adds, verifies, diagnoses, lists and removes customer sending domains, so an agent can run the checks while a person approves the DNS changes. If a domain will not leave the verifying state, see a domain stuck verifying. For the sending side, see the transactional email API and email for Claude.

FAQ

How do I authenticate my email?

Publish three DNS records on your sending domain. Add one SPF record listing your sending sources, enable DKIM with your provider and publish its key, then add a DMARC record at p=none. Send one real test message and check that its headers show spf=pass, dkim=pass and dmarc=pass before tightening DMARC.

What order do I set up SPF, DKIM, and DMARC?

SPF and DKIM can go in either order, because neither depends on the other. DMARC comes third, since it checks that at least one of them passes and aligns with the From domain. Start DMARC at p=none, read the aggregate reports until every legitimate sender passes, then move to quarantine and, on a sending subdomain, reject.

Can an AI agent authenticate my email domain?

Yes, for most of the work. Through nitro_manage_domains an agent can add the domain, return the exact records and verify them once they are published. A person should still approve each of the three DNS changes and check the headers of one real test message before any real mail goes out.

Go deeper

Add your sending domain and get the records to publish, free.

Simple pricing. Unlimited contacts.

Every plan includes full stack emailing: Flows, Newsletter Campaigns and Transactional Email, plus our NitroWheel LLM and all agent integrations (Claude, ChatGPT, Codex, Cursor and others). Pay for what you send, not who you store.

Choose your billing interval

Every paid plan includes 3 agent inboxes and no Nitrosend footer.

Starter

For your first email program.

$16USD / month

$192 billed yearly.

20,000 emails / month

Choose Starter
  • 5 brands · 3 seats
  • 5 custom sending domains
  • 500 email verifications/month
  • $1.50 / 1,000 extra emails

Pro

For a growing audience.

$40USD / month

$480 billed yearly.

60,000 emails / month

Choose Pro
  • 10 brands · 5 seats
  • 10 custom sending domains
  • 1,000 email verifications/month
  • $1.20 / 1,000 extra emails

Growth

For teams and agencies.

$120USD / month

$1,440 billed yearly.

200,000 emails / month

Choose Growth
  • Unlimited brands · 10 seats
  • 25 custom sending domains
  • 2,500 email verifications/month
  • $0.90 / 1,000 extra emails

Scale

For high-volume sending.

$240USD / month

$2,880 billed yearly.

500,000 emails / month

Choose Scale
  • Unlimited brands · 20 seats
  • 100 custom sending domains
  • 5,000 email verifications/month
  • $0.70 / 1,000 extra emails
Enterprise

Hey, big sender.

Sending 500,000+ emails a month? Get a custom plan designed for you, with volume email pricing and capacity that fits your business.

Start free. No card needed.

5,000 emails to start, then 500 emails every month. No expiry on your starter emails.

Start free

Daily allowances depend on your plan and sender standing. Strong list, domain and delivery evidence can raise standing, including on day one. Trusted receives the full plan allowance; available email credits, safety checks and delivery pacing still apply.

Free forever. No credit card required. See full comparison →