Key points
- Between servers, TLS is usually started with the STARTTLS command on port 25.
- Users submit mail on port 587 with STARTTLS or on port 465 with implicit TLS.
- IMAP uses port 993 with implicit TLS; POP3 uses port 995.
- TLS between servers is opportunistic unless MTA-STS or DANE requires it.
- TLS protects the channel, not the message; each hop negotiates its own session.
How is TLS used in email?
There are two ways to start it. With STARTTLS, the client connects in plain text, asks to upgrade and both sides negotiate encryption before anything sensitive is sent. With implicit TLS, the connection is encrypted from the first byte on a dedicated port.
RFC 8314 recommends implicit TLS for users who submit and read mail. Between servers, STARTTLS on port 25 remains the norm.
What does TLS not protect?
TLS covers one connection at a time. A message that passes through three servers is decrypted and encrypted again at each one, and it rests unencrypted in the mailbox unless something else protects it.
TLS also says nothing about whether the sender is who it claims to be. That is the job of SPF, DKIM and DMARC.
Which TLS versions should a mail server accept?
TLS 1.2 and TLS 1.3. RFC 8996 formally deprecated TLS 1.0 and 1.1, and the old SSL versions should be disabled entirely. The certificate should match the host name that clients and other servers use to connect.
Example SMTP session upgrading to TLS
S: 220 mx.example.com ESMTP
C: EHLO mail.example.com
S: 250-mx.example.com
S: 250-STARTTLS
S: 250 SIZE 52428800
C: STARTTLS
S: 220 2.0.0 Ready to start TLSHow AHSU 360 handles this
AHSU 360 filters mail before it reaches the mail server, checking SPF, DKIM and DMARC and scanning attachments for viruses. The last 180 days of messages stay searchable, which helps investigate any delivery problem.
