Day 3 · Sender authentication
SRS, ARC, MTA-STS, TLS-RPT, DANE and BIMI explained
Course contents
SPF, DKIM and DMARC answer “is this message really from this domain?”. They leave three gaps: legitimate forwarding breaks them, the connection between servers can still be downgraded to plaintext, and none of them gives the reader a visible sign that a message is authentic. This lesson covers the protocols that fill those gaps: SRS and ARC for forwarding, MTA-STS, TLS-RPT and DANE for transport security, and BIMI for brand logos.
Forwarding: SRS
When a server forwards a message unchanged, SPF fails at the next hop: the forwarder’s IP isn’t in the original sender’s SPF record (lesson 8). SRS (Sender Rewriting Scheme) fixes SPF by having the forwarder rewrite the envelope sender to an address in its own domain, which encodes the original:
MAIL FROM:<alice@example.com> # what the forwarder received
MAIL FROM:<SRS0=Hx7q=TV=example.com=alice@forwarder.example> # what it sends on
SRS0 marks a rewritten address, Hx7q is a short hash (so nobody can abuse the forwarder to send bounces anywhere), TV a timestamp, then the original domain and local part. SPF at the next hop is now checked for forwarder.example, and passes. If the message bounces, the forwarder decodes the address and passes the bounce back to Alice.
SRS fixes SPF, but not DMARC: the new envelope domain doesn’t align with Alice’s From. For DMARC to pass after forwarding, the DKIM signature must survive, which it does when the forwarder doesn’t modify the message. In Postfix, SRS is added with the postsrsd daemon; hosted forwarding services and Microsoft 365 and Google rewrite automatically.
Forwarding that changes the message: ARC
Mailing lists and some security gateways modify messages (subject tags, footers, rewritten links), which breaks DKIM too. Now both SPF and DKIM fail at the final receiver, and with a strict DMARC policy, legitimate mail is rejected. ARC (Authenticated Received Chain, RFC 8617) lets each intermediary say “when this message reached me, it passed authentication”, in a way the next hop can verify.
Each ARC-aware hop adds a set of three headers, numbered by an instance i=:
ARC-Seal: i=1; a=rsa-sha256; d=lists.example.org; s=arc2026; cv=none; b=...
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.example.org; s=arc2026;
h=from:to:subject:date:message-id; bh=...; b=...
ARC-Authentication-Results: i=1; lists.example.org;
dkim=pass header.d=example.com; spf=pass smtp.mailfrom=example.com; dmarc=pass header.from=example.com
- ARC-Authentication-Results (AAR): a copy of the authentication results this hop saw.
- ARC-Message-Signature (AMS): a DKIM-like signature of the message as this hop sends it.
- ARC-Seal (AS): a signature over all the ARC headers so far, with
cv=(chain validation) saying whether the earlier chain was valid (nonefor the first hop, thenpassorfail).
The final receiver can see that the message passed DMARC when it reached lists.example.org, that the chain since then is intact, and decide, if it trusts lists.example.org, to deliver despite the DMARC failure. ARC doesn’t force anything; it gives receivers evidence. Gmail, Microsoft 365 and Yahoo evaluate ARC, and Microsoft 365 lets admins list trusted ARC sealers (for example, a security gateway in front of the tenant). Mailing list software (Mailman 3, Google Groups) and many gateways add ARC seals.
Encryption between servers: the downgrade problem
Server-to-server SMTP uses STARTTLS opportunistically (lesson 3): if TLS isn’t offered, or if an attacker on the path removes STARTTLS from the EHLO answer, the sender delivers in plaintext. And the sender usually doesn’t verify the receiver’s certificate, so an attacker can also present any certificate. Two standards let a receiving domain say “always use TLS with a valid certificate when delivering to me”: MTA-STS (based on HTTPS and the web PKI) and DANE (based on DNSSEC).
MTA-STS
MTA-STS (RFC 8461) has two parts. A TXT record announces that a policy exists, and its id changes whenever the policy changes:
dig +short _mta-sts.gmail.com TXT
"v=STSv1; id=20190429T010101;"
The policy itself is a text file served over HTTPS from a fixed host name, mta-sts.<domain>:
curl https://mta-sts.gmail.com/.well-known/mta-sts.txt
version: STSv1
mode: enforce
mx: smtp.google.com
mx: gmail-smtp-in.l.google.com
mx: *.gmail-smtp-in.l.google.com
max_age: 86400
It says: deliver only to MX hosts matching these names, only over TLS with a certificate valid for that name (checked against the normal web CAs), and cache this policy for max_age seconds. mode is enforce (refuse to deliver otherwise), testing (deliver anyway, but report failures) or none (withdraw the policy).
Because the policy is fetched over HTTPS and cached, an attacker who later tampers with DNS or SMTP can’t downgrade the connection: the sender already knows TLS is mandatory. (The very first fetch is “trust on first use”.) Gmail and Microsoft 365 both validate MTA-STS when sending.
To deploy MTA-STS for your domain:
- Make sure every MX has a valid certificate for its own name (hosted providers already do).
- Serve the policy file at
https://mta-sts.example.com/.well-known/mta-sts.txtwith a valid certificate (any static host works) inmode: testing. - Publish
_mta-sts.example.com TXT "v=STSv1; id=2026110101"and a TLS-RPT record (below). - After a few weeks of clean reports, switch to
mode: enforce, raisemax_age(a week or more), and change theid. Change theidevery time you edit the policy, or senders keep the old one. - Before changing MX hosts in a migration, add the new MX to the policy first.
TLS-RPT
TLS-RPT (RFC 8460) is the reporting side: sending servers that support it send you a daily JSON report of successful and failed TLS connections to your MX hosts, including MTA-STS and DANE failures. Without it, an enforced policy that breaks delivery fails silently.
dig +short _smtp._tls.gmail.com TXT
"v=TLSRPTv1;rua=mailto:sts-reports@google.com"
DANE for SMTP
DANE (RFC 7672 for SMTP, using TLSA records from RFC 6698) solves the same problem with DNSSEC instead of HTTPS: the receiving domain publishes, in a DNSSEC-signed zone, a TLSA record that pins its MX’s certificate or key. A sender that supports DANE looks it up and refuses to deliver unless the server presents a matching certificate. These are the TLSA records for the IETF’s own MX:
_25._tcp.mx.ietf.org. TLSA 3 1 1 292481EEE04F9F5CE0DC1728488DEE2510053AF6D62F4E7CDEF8C82D811A5AE9
_25._tcp.mx.ietf.org. TLSA 3 1 1 E3008A5C0BC1E088455EC997DA389D31D2B379F76727BCB6594316F6058E6190
3 1 1 means: usage 3 (DANE-EE, pin the server’s own key, no CA needed), selector 1 (the public key, not the whole certificate, so renewing a certificate with the same key doesn’t break it), matching type 1 (SHA-256). Two records are published so the key can be rolled over: the next key is published before it’s used.
| MTA-STS | DANE | |
|---|---|---|
| Trust comes from | Web PKI (public CAs) + HTTPS | DNSSEC |
| Needs | An HTTPS host and a policy file | DNSSEC on the MX’s zone, TLSA records |
| Downgrade protection | After the first policy fetch (cached) | From the first connection |
| Support among senders | Gmail, Microsoft 365, Yahoo and others | Postfix, Exim and others; Microsoft 365; widely used in Germany, the Netherlands and Nordic countries |
| Good fit | Domains on hosted providers, no DNSSEC | Domains that already run DNSSEC |
You can deploy both. Postfix validates DANE when sending with smtp_tls_security_level = dane and smtp_dns_support_level = dnssec (it needs a local DNSSEC-validating resolver).
REQUIRETLS
MTA-STS and DANE are set by the receiving domain. REQUIRETLS (RFC 8689) lets the sender of a single message demand TLS on every hop (MAIL FROM:<...> REQUIRETLS), for sensitive mail. Support is still rare.
BIMI: your logo in the inbox
BIMI (Brand Indicators for Message Identification) lets a domain with strong authentication display its logo next to its messages in supporting mailbox providers (Gmail, Yahoo, Apple Mail and others). It’s a reward for doing DMARC properly, and it makes spoofed mail stand out by its missing logo. The requirements:
- DMARC at enforcement:
p=quarantineorp=reject(no testing mode), on the organizational domain as well. - The logo as an SVG in the “SVG Tiny Portable/Secure” profile (no scripts, no external references, square), served over HTTPS.
- For most providers, a mark certificate that proves you have the right to use the logo: a VMC (Verified Mark Certificate, for a registered trademark) or a CMC (Common Mark Certificate, for a logo you can show you have used for some time). Gmail shows logos with either, and a blue “verified” checkmark only with a VMC; Apple Mail requires a VMC. Certificates are issued by a few CAs (DigiCert, Sectigo, GlobalSign and others) and cost money every year.
- A BIMI record at
default._bimi.<domain>:
dig +short default._bimi.paypal.com TXT
"v=BIMI1; l=https://www.paypalobjects.com/marketing/web/logos/paypal_ppe.svg; a=https://www.paypalobjects.com/marketing/web/logos/PPE_UK_DE_paypal_inc.pem"
l= points to the logo, a= to the certificate. Look at both:
curl -s https://www.paypalobjects.com/marketing/web/logos/paypal_ppe.svg | head -2
curl -s -o paypal.pem https://www.paypalobjects.com/marketing/web/logos/PPE_UK_DE_paypal_inc.pem
openssl x509 -in paypal.pem -noout -subject -issuer -dates -ext extendedKeyUsage
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" baseProfile="tiny-ps" version="1.2" viewBox="0 0 700 700">
subject=jurisdictionC = US, jurisdictionST = Delaware, businessCategory = Private Organization, serialNumber = 3014267, C = US, ST = California, L = San Jose, street = 2211 N 1st St, O = "PayPal, Inc.", CN = "PayPal, Inc.", 1.3.6.1.4.1.53087.1.13 = Registered Mark, 1.3.6.1.4.1.53087.1.3 = BX, 1.3.6.1.4.1.53087.1.4 = 1510250
issuer=C = US, O = "DigiCert, Inc.", CN = DigiCert Verified Mark RSA4096 SHA256 2021 CA1
notBefore=Jul 13 00:00:00 2026 GMT
notAfter=Jul 12 23:59:59 2027 GMT
X509v3 Extended Key Usage:
Brand Indicator for Message Identification
The SVG declares baseProfile="tiny-ps". The certificate is issued by a Verified Mark CA, its extended key usage is “Brand Indicator for Message Identification” (it can’t be used for a website), and the subject records a registered mark with its trademark office and number: that’s a VMC. (The PEM file also contains the CA chain, and the full certificate embeds the logo itself.)
BIMI is optional and costs money; DMARC at enforcement is not. Do BIMI after everything else in this course is in place, if your brand is often impersonated or your marketing team values the logo.