Email Authentication: SPF, DKIM, DMARC and MTA-STS
Email was designed without any way to prove who sent a message. Email authentication is the set of DNS records that adds that proof after the fact. SPF says which servers may send for your domain, DKIM signs each message, DMARC ties them to the address people see and says what to do when checks fail, and MTA-STS makes sure mail to you travels encrypted. Since 2024 Google and Yahoo require email authentication for bulk senders, and Microsoft followed for Outlook.com in 2025. Without it, your mail lands in spam and anyone can pretend to be you.
| Record | Lives at | Protects |
|---|---|---|
| SPF | TXT on example.com | Which servers may send mail for the domain |
| DKIM | TXT on selector._domainkey.example.com | That a message was signed by the domain and not changed |
| DMARC | TXT on _dmarc.example.com | The visible From address, with a policy and reports |
| MTA-STS | TXT on _mta-sts.example.com plus a policy file | Encryption of mail sent to your domain |
| TLS-RPT | TXT on _smtp._tls.example.com | Reports about failed encrypted delivery |
SPF: The First Layer of Email Authentication
SPF (Sender Policy Framework) is a TXT record listing the servers and services allowed to send mail for your domain, ending in ~all or -all. You need exactly one, it must stay under 10 DNS lookups, and it checks the hidden envelope sender rather than the From address. The SPF record guide covers the common mistakes.
DKIM: A Signature on Every Message
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each message. The receiving server looks up your public key in DNS and checks that the message was signed by your domain and not modified. Each sending service gets its own key under a selector:
- Turn on DKIM in every service that sends as your domain, and make sure it signs with your domain, not the provider's.
- Use 2048-bit keys where the provider supports them.
- Rotate keys occasionally by publishing a new selector before retiring the old one.
DMARC: Alignment, Policy and Reports
DMARC passes when SPF or DKIM passes for a domain that matches the From address. That alignment step is what actually stops spoofing. The policy then tells receivers what to do with failing mail: p=none to monitor, p=quarantine for spam, p=reject to block. Aggregate reports sent to your rua address show every source sending as your domain. The DMARC guide explains the record and a safe path to p=reject.
MTA-STS: Encrypted Delivery to You
SPF, DKIM and DMARC protect mail you send. MTA-STS (Mail Transfer Agent Strict Transport Security) protects mail sent to you. Without it, an attacker in the network path can strip the encryption between mail servers and read messages in transit. MTA-STS tells sending servers to require TLS and a valid certificate when delivering to your MX hosts. It needs two parts:
Start in mode: testing, check reports, then switch to mode: enforce with a longer max_age. Change the id in the TXT record whenever you change the policy.
TLS-RPT: Reports on Encryption Failures
TLS-RPT is a TXT record at _smtp._tls.example.com, such as v=TLSRPTv1; rua=mailto:tls-reports@example.com. Sending servers use it to report when they could not deliver to you securely. Publish it alongside MTA-STS so you know if your policy is blocking mail.
Beyond the Basics: BIMI and ARC
- BIMI shows your logo next to messages in supporting inboxes. It requires DMARC at
p=quarantineorp=reject, and some inboxes, including Gmail, also require a verified mark certificate. - ARC lets forwarding services and mailing lists pass on authentication results, so forwarded mail is less likely to fail DMARC. It is set up by the forwarding service, not by you.
Bulk Sender Requirements
Google and Yahoo's rules for bulk senders (more than about 5,000 messages a day to Gmail) require SPF and DKIM, a DMARC record of at least p=none with alignment, a one-click unsubscribe for marketing mail, and a low spam complaint rate. Microsoft introduced similar requirements for high-volume senders to Outlook.com in 2025. Even smaller senders benefit, because the same email authentication signals decide inbox placement.
An Email Authentication Setup Order That Will Not Break Your Mail
- List every service that sends as your domain.
- Publish one SPF record that includes all of them, ending in
~all. - Turn on DKIM with your own domain in each service.
- Publish DMARC at
p=nonewith aruareport address. - Fix any sender that fails in the reports, then move to
p=quarantineandp=reject. - Add MTA-STS in testing mode and TLS-RPT, then switch MTA-STS to enforce.
- Protect domains that never send email with
v=spf1 -allandp=reject.
Check Your Email Authentication Records
A security scan checks your domain's email authentication in one pass: whether an SPF record exists, whether DKIM keys are published on common selectors used by Google, Microsoft, Zoho and others, whether DMARC exists and is still at p=none, and whether an MTA-STS record is published. It also reads your TLS-RPT record, and checks DNSSEC and CAA records for the domain. It checks the main domain even if you enter a www address. It cannot see DKIM keys on unusual selectors or read your DMARC reports, so use those reports to confirm every sender passes. For how findings are ranked, see how to read a security scan report.
Häufig gestellte Fragen
Email authentication is a set of DNS records, mainly SPF, DKIM and DMARC, that lets receiving servers check that a message really comes from the domain it claims and has not been changed.
Yes. Each covers a different gap, and DMARC needs SPF or DKIM to pass for the visible From domain. Google, Yahoo and Microsoft require all three for bulk senders.
MTA-STS is a policy that tells other mail servers to use encrypted, certificate-checked connections when delivering email to your domain. It prevents attackers from stripping encryption in transit.
MTA-STS sets the rule that delivery to you must be encrypted. TLS-RPT asks sending servers to send you reports when encrypted delivery fails, so you can spot problems with the policy.
Look up the SPF, DKIM, DMARC and MTA-STS records with dig or nslookup, check message headers in a received email, or run a security scan that checks them together.
Related reading
What Is DMARC? Records, Policies and How to Get to p=reject
What is DMARC and why does every domain need it? How DMARC works with SPF and DKIM, how to read a DMARC record, and a safe path from p=none to p=reject.
How to Fix a Missing or Broken SPF Record
How to fix an SPF record: add one when none exists, include every service that sends your email, stay under the 10 DNS lookup limit and choose between ~all and -all.
How to Read a Website Security Scan Report
Severity ratings, CVSS scores, and a findings list that looks alarming at first glance - a practical guide to triaging a security scan report without panicking or ignoring it.
Subdomain Takeover: How Dangling DNS Gets Hijacked
What a subdomain takeover is, how dangling CNAME records let attackers serve content on your domain, which services are affected, and how to find and fix them.
What Is security.txt? RFC 9116 With an Example
What security.txt is, where it goes, the required and optional fields in RFC 9116, a copy-ready example, and the common mistakes that make the file useless.
Security Scan
Checks SPF, DKIM, DMARC, MTA-STS, DNSSEC and CAA in one pass.
Find out which headers you're missing
Run a free security scan and get a plain-English breakdown of every header, cert, and exposed secret.
Run a free security scan