Learn · Email authentication

SPF, DKIM and DMARC explained

SPF lists the servers allowed to send for your domain. DKIM signs each message so receivers can tie it to your domain and see it wasn't changed. DMARC checks that one of them passed for the domain in your From address, and says what to do if not.

RECEIVER CHECKS · ACME.COM
Three records, checked in turn
TXT · acme.com
v=spf1 include:_spf.google.com include:_spf.tinyemail.com -all
  • SPFMAIL FROM acme.com · server is listedpass
  • DKIMchecked next…
  • DMARCchecked next…

The receiver asks: is this server allowed to send for the envelope domain?

CNAME · tec1._domainkey.acme.com
tec1._domainkey.acme.com CNAME tec1.dkim.tinyemail.com
  • SPFMAIL FROM acme.com · server is listedpass
  • DKIMd=acme.com · s=tec1 · body unchangedpass
  • DMARCchecked next…

The receiver asks: a domain signs the message, and the public key lives in DNS. Does the signature check out?

TXT · _dmarc.acme.com
v=DMARC1; p=none; rua=mailto:dmarc-reports@acme.com
  • SPFMAIL FROM acme.com · server is listedpass
  • DKIMd=acme.com · s=tec1 · body unchangedpass
  • DMARCFrom: acme.com · aligned · p=nonepass

The receiver asks: did SPF or DKIM pass for the From domain? If not: none, quarantine or reject.

Example domain, records and results · illustrative.

Record by record

What each record looks like, and what goes wrong.

Pick a record for an example, what it proves, the mistakes we see most, and how it works with tinyRelay.

EXAMPLE RECORD
Host
acme.com
Type
TXT
Starts with
v=spf1
v=spf1 include:_spf.google.com include:_spf.tinyemail.com -all

Illustrative. The tinyRelay docs' example SPF record includes _spf.tinyemail.com; confirm the include for your account at onboarding.

What it proves

The server that connected is authorized to use your domain in the SMTP MAIL FROM (envelope) or HELO identity. It says nothing about the From address people see. That's DMARC's job.

Common mistakes

  • Two SPF records on one domain. RFC 7208 says a domain must not have multiple records; merge them into one.
  • More than 10 DNS-querying terms (include, a, mx, ptr, exists, redirect). Past the limit, evaluation returns permerror.
  • Leaving out a service that sends for you, such as your helpdesk or billing tool.

With tinyRelay

PUT /domain/dns/check validates SPF for a domain and returns its status plus the record it expects.

Validate DKIM and SPF in the docs →
THE RECORD TINYRELAY USES
Host
tec1._domainkey
Type
CNAME
Value
tec1.dkim.tinyemail.com
tec1._domainkey.acme.com. CNAME tec1.dkim.tinyemail.com.

What it proves

A domain claims responsibility for the message with a cryptographic signature. Receivers read the signing domain (d=) and selector (s=) from the DKIM-Signature header and fetch the public key from DNS. A body hash shows whether the content changed in transit.

Common mistakes

  • The DNS panel appends your domain, so tec1._domainkey.acme.com becomes tec1._domainkey.acme.com.acme.com. Enter just tec1._domainkey if your panel works that way.
  • Adding it as a TXT record. tinyRelay's record is a CNAME.
  • Setting it up on one domain and sending from another, such as a subdomain.

With tinyRelay

One CNAME per sending domain signs your mail. You don't paste a public key into DNS. PUT /domain/dns/check reports DKIM as Valid or Invalid.

Deliverability and authentication →
EXAMPLE RECORD
Host
_dmarc.acme.com
Type
TXT
Starts with
v=DMARC1
v=DMARC1; p=none; rua=mailto:dmarc-reports@acme.com

Illustrative. Use your own reporting address.

What it proves

That SPF or DKIM passed for a domain aligned with the From address. Relaxed alignment, the default, accepts the same organizational domain; strict needs an exact match. The p= policy tells receivers what to do when it fails: none, quarantine or reject.

Common mistakes

  • Starting at p=reject before every service that sends for you passes.
  • No rua address, so you never see the aggregate reports.
  • Publishing it on the root domain instead of _dmarc.
  • Assuming an SPF pass means a DMARC pass. Without alignment, it doesn't.

With tinyRelay

DMARC is a record you publish on your own domain. The DNS check endpoint covers DKIM and SPF; our free checker also reads your DMARC record.

SPF, DKIM and DMARC checker →

How SPF, DKIM and DMARC work together

Each record answers a different question, and receivers ask them in order.

  • SPF (RFC 7208): may this server send mail for the domain in the envelope? You publish one TXT record on the domain listing the servers and services that send for it.
  • DKIM (RFC 6376): which domain takes responsibility for this message, and did it arrive unchanged? The sending service signs the message; receivers check the signature against a public key in your DNS.
  • DMARC (RFC 7489): did either check pass for the domain people see in the From address, and if not, what should happen? You publish a TXT record at _dmarc.

Mailbox providers now ask for them directly. Google asks every sender for SPF or DKIM, and senders of more than 5,000 messages a day to Gmail accounts for SPF, DKIM and DMARC. Yahoo asks bulk senders for all three. The full list is in Gmail and Yahoo sender requirements.

SPF DKIM DMARC alignment, in plain words

SPF checks the envelope domain. DKIM checks the signing domain in d=. Neither looks at the From header people see. DMARC closes that gap: it passes only when SPF or DKIM passes and the authenticated domain lines up with the From domain.

In relaxed mode, the default for both adkim and aspf, mail.acme.com aligns with acme.com because they share an organizational domain. In strict mode, only an exact match counts.

RELAXED · DEFAULTAligned
From: acme.com
d=mail.acme.com
Same organizational domain.
STRICTNot aligned
From: acme.com
d=mail.acme.com
Only an exact match counts.

The order to set them up

  1. List everything that sends as your domain. Your app, your marketing platform, your helpdesk, billing and HR tools.
  2. Publish one SPF record that covers them, and stay under 10 DNS-querying terms.
  3. Turn on DKIM for each sender. For tinyRelay that's one CNAME per sending domain.
  4. Publish DMARC with p=noneand a rua address, then read the aggregate reports.
  5. Tighten the policy to quarantine, then reject, once every legitimate sender passes.

Setting up a sending domain with tinyRelay

Our team adds your sending domains during onboarding. You add one CNAME so your mail is DKIM-signed:

HostTypeValue
tec1._domainkey.yourdomain.comTypeCNAMEValuetec1.dkim.tinyemail.com

Then check it. PUT /domain/dns/check validates DKIM and SPF for a domain and returns a status for each, plus the records it expects to find.

PUT /domain/dns/checkCopy
curl -X PUT https://api.tinyemail.com/v1/relay/domain/dns/check \
  -H "X-RELAY-ACCESS-TOKEN: $TINYRELAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "acme.com" }'

# 200 (shape from the docs)
{
  "dkim": { "status": "Invalid", "dns": [{ "type": "CNAME", "name": "tec1._domainkey.", "value": "tec1.dkim.tinyemail.com" }] },
  "spf":  { "status": "Valid",   "dns": [{ "type": "TXT", "name": "@", "value": "v=spf1 … include:_spf.tinyemail.com … -all" }] }
}

Base URL from current site samples; confirm in the docs. Response shortened.

DMARC is yours to publish on your domain. To see all three records at once, run your domain through the free SPF, DKIM and DMARC checker.

What happens when authentication fails

A receiving server that refuses mail on authentication grounds shows up in tinyRelay as a BOUNCED event with bounce category 55, SPF/DKIM/DMARC: refused on authentication policy. The event's bounceDescription carries the receiving server's own words, which usually name the failing check. See the email bounce codes reference and how events reach you through signed webhooks.

55SPF/DKIM/DMARCBOUNCED · refused on authentication policy. bounceDescription carries the receiving server's own words.

Sources

FAQ

SPF, DKIM and DMARC questions

Still unsure about your records? Run the checker.

What is the difference between SPF, DKIM and DMARC?

SPF lists the servers allowed to send for a domain. DKIM adds a cryptographic signature that ties a message to a domain and shows it was not changed. DMARC checks that one of them passed for the domain in the From address and tells receivers what to do if not.

Google asks all senders for SPF or DKIM, and senders of more than 5,000 messages a day to Gmail accounts for SPF, DKIM and DMARC. Yahoo asks bulk senders for SPF, DKIM and a DMARC policy of at least p=none. Setting up all three is the simplest way to meet both.

A CNAME at tec1._domainkey on your domain points to tec1.dkim.tinyemail.com, where the key is published. You add one record and don't have to paste a long public key into your DNS.

Use the free SPF, DKIM and DMARC checker to look up your public records, or call PUT /domain/dns/check, which validates DKIM and SPF for a domain and returns the records it expects.

Start with p=none and a rua address so you receive aggregate reports. Once every service that sends for your domain passes, move to quarantine and then reject.

Get started

Send transactional email with a service that reports back.

SMTP relay or REST API, standalone or alongside tinyEmail. Tell us what you send and our team sets you up.