Agent Wranglers

EML-14Required

Send and receive over TLS

Offer STARTTLS with a valid certificate on every MX host, and send outgoing mail over TLS.

How to do it

STARTTLS (RFC 3207) encrypts mail between servers. Use a certificate that matches the MX host name and renews by itself, and allow TLS 1.2 or newer. Then make other servers refuse to fall back to plain text, as Require TLS for incoming mail with MTA-STS and get TLS reports says. When a sending provider sends for you, check that it uses TLS. Your part is SPF, DKIM and DMARC on your domain.

Examples

Shell example

openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com -brief </dev/null

How to check

openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com shows a verified certificate chain for the MX name. A test message's Received header in Gmail shows version=TLS1_2 or version=TLS1_3.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/email/sending-domain-and-authentication/smtp-tls">Agent Wranglers email playbook</a>. In code you write, add a comment next to it with the same link.