← Learn

SPF, DKIM and DMARC: What They Actually Do

Three DNS records, three different jobs. What each one proves, the order to set them up in, and the mistakes that quietly break authentication.

Three records, three different jobs

People treat these as one checkbox called "authentication". They are not. SPF answers "was this server allowed to send for this domain?" DKIM answers "was this message altered in transit, and who signed it?" DMARC answers "what should the receiver do when the first two fail, and who gets told about it?"

A rough analogy: SPF is the guest list, DKIM is the wax seal on the envelope, and DMARC is the instruction to the doorman about what to do with a broken seal.

SPF — the guest list

  • A TXT record on the sending domain, e.g. v=spf1 include:amazonses.com ~all
  • Exactly one SPF record per domain. Two records is a permanent error, not a merge.
  • SPF has a limit of ten DNS lookups; nesting too many includes breaks it silently.
  • SPF checks the envelope return-path domain, which is not necessarily your visible From address.
  • SPF breaks when mail is forwarded — the forwarding server is not on your guest list. This is why DKIM matters.

DKIM — the wax seal

  • Your provider gives you tokens to publish, usually as CNAMEs at selector._domainkey.yourdomain.com.
  • Each message carries a cryptographic signature over selected headers and the body.
  • The signature survives forwarding, so DKIM keeps working where SPF fails.
  • Rotate selectors periodically if your provider supports it.
  • The signing domain must align with your visible From domain for DMARC to pass.

DMARC — the policy and the reports

  • A TXT record at _dmarc.yourdomain.com, e.g. v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
  • Start at p=none. This changes nothing about delivery but sends you aggregate reports showing who is sending as you.
  • Read the reports for a couple of weeks. Then move to p=quarantine, and only then p=reject.
  • Jumping straight to p=reject before you know every legitimate sender is how companies block their own invoices.
  • Alignment can be relaxed (subdomains match) or strict (exact match). Relaxed is the usual, sane default.

Why a marketing subdomain is the sane default

Send marketing from mail.yourdomain.com rather than yourdomain.com. Authentication, reputation and any future mistake stay scoped to the subdomain, while your corporate mail on the root domain is untouched. It also makes alignment straightforward: the From address, the signing domain and the return-path all live under the same subdomain.

Order of operations

  • 1. Choose the sending subdomain.
  • 2. Publish the SPF include for your sending provider.
  • 3. Publish the DKIM tokens and wait for verification.
  • 4. Publish DMARC at p=none with a reporting address.
  • 5. Send a test to Gmail and Outlook; check the authentication results in the message headers.
  • 6. Read DMARC reports for two weeks.
  • 7. Tighten DMARC to quarantine, then reject.

The mistakes that break it quietly

  • Two SPF TXT records on the same domain.
  • More than ten DNS lookups in the SPF chain.
  • DKIM published but never verified by the provider.
  • From address on the root domain while DKIM signs a subdomain, with strict alignment.
  • DMARC at p=reject before every legitimate sender was accounted for.
  • No rua address, so nobody ever sees the reports.

How BazukaMail handles it

Each brand shows the exact records to publish for its own domain, then verifies them before that brand is allowed to send. Because verification is per brand, an agency can authenticate ten client domains without any of them sharing a signature — or a reputation.

FAQs

Do I really need all three?

SPF and DKIM are the mechanisms; DMARC is what makes them enforceable and observable. Major mailbox providers expect all three from bulk senders, so yes.

Can I have two SPF records?

No. One record per domain. Merge the includes into a single record, and watch the ten-lookup limit.

How long until the records work?

DNS propagation is usually minutes to a few hours, occasionally up to 48 hours depending on TTL. Verify in the platform before sending.

Should I go straight to p=reject?

No. Start at p=none, read the aggregate reports until you have accounted for every legitimate sender, then tighten in stages.