Internet-Draft | Secure SMTP/TLS SRV Announcement | July 2025 |
Nurpmeso | Expires 21 January 2026 | [Page] |
This specification defines a DNS (RFC 1035) SRV (RFC 2782) record that announces TLS (RFC 9325) secured SMTP (RFC 5321, RFC 3207), optionally including Implicit TLS.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 21 January 2026.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
[RFC2782] defines a widely adopted DNS-based service discovery protocol. [RFC6186] is a specification of SRV[RFC2782] records for the email protocols IMAP[RFC9051], POP3[RFC1939], and SUBMISSION[RFC6409]. This includes DNS service names for Implicit TLS protocol variants. SMTP[RFC5321] connections to MTAs ([RFC5598]) do not yet define SRV records for no ever spelled out reason. (According usage does exist, see for example the German De-Mail definition law.)¶
Moreover, no Implicit TLS SMTP protocol variant has ever been specified, despite noticeable achievable non-batchable packet roundtrip savings, and despite availability, or easy adoptability, of such a protocol variant in existing code bases. This specification adds a SMTP/TLS service name for SRV[RFC2782] records.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The term "Implicit TLS" refers to the automatic negotiation of TLS whenever a TCP connection is made on a particular TCP port that is used exclusively by that server for TLS connections. The term "Implicit TLS" is intended to contrast with the use of the STARTTLS command in SMTP that is used by the client and the server to explicitly negotiate TLS on an established cleartext TCP connection.¶
The term "FOSS" refers to Free and Open Source Software.¶
The service name for TLS[RFC9325] enabled Secure[RFC3207] SMTP[RFC5321] is smtp-tls, the resulting DNS label _smtp-tls.¶
Shall the SRV RR not equal IANA port number 25, support for Implicit TLS on the specified port is announced additionally. The port number SHOULD be given as 842.¶
Servers SHOULD NOT announce STARTTLS in the EHLO command response of an Implicit TLS connection. If a client issues a STARTTLS[RFC3207] extension command during an Implicit TLS connection, the SMTP reply code 554 SHOULD be returned, if enhanced status codes[RFC3463] are used, 5.5.1 SHOULD be used.¶
DNS SRV RRs MUST take priority over MX[RFC5321] ones: no MX lookup SHOULD be performed, and no otherwise available MX RR MUST be used in the presence of a SRV RR.¶
After a successful _smtp-tls DNS SRV lookup cleartext communication SHOULD NOT be used. Servers and clients which make use of the _smtp-tls DNS SRV SHOULD follow the guidelines of TLS[RFC9325].¶
If a DNS SRV lookup fails with "NODATA" negative caching[RFC2308] (sections 2.2 and 5) conditions, not only a maximum, but also a minimum cache time limit SHOULD be used in order to reduce excessive DNS SRV RR lookups. (It MAY seem sensible to use the TTL of the domains MX or address RR, with a maximum limit, as via [RFC2308], section 5.)¶
An announcement for the STARTTLS SMTP service extension.¶
_smtp-tls._tcp SRV 0 0 25 mail.example.com.¶
An announcement of Implicit TLS, in addition to STARTTLS.¶
_smtp-tls._tcp SRV 0 0 842 mail.example.com.¶
A multi-server scenario where the main server supports Implicit TLS and STARTTLS, whereas the backup server only supports STARTTLS.¶
_smtp-tls._tcp SRV 0 0 842 mail.example.com. _smtp-tls._tcp SRV 1 0 25 backup.example.com.¶
If, after a successful _smtp-tls DNS SRV lookup that announces Implicit TLS support, connecting to the announced port fails, a connection to the IANA SMTP port 25 SHOULD be established which MUST use the STARTTLS SMTP extension. If none of the shortcomings described next apply, the fallback connection MAY however be omitted.¶
Informative remark: This is meant to overcome two shortcomings: first the given port may be blocked along the network path; it may take time until an IANA registration takes places, and/or the network adapts; whereas expected to be a rare event for the System Ports range ([RFC6335]), defining a recovery strategy seems useful.¶
Second DNS SRV lookups could return results unprotected by DNSSEC[RFC4033][RFC4034][RFC4035], or without perceived knowledge of whether DNSSEC was actually used, for example, when the DNS is accessed via some kind of furtherly unspecified intermediate proxy that needs to be trusted: in either case the possibility of DNS forge attacks exist; if the STARTTLS secured connection to the IANA SMTP port fails, the DNS result SHOULD be treated with maximum suspicion. The mail log record may give useful insight.¶
The section of [RFC6186] named "Guidance for MUAs" (section 4) in parts also applies to this specification.¶
The equally named section of [RFC6186] (section 5) also applies to this specification.¶
IANA is asked to allocate port number 842 for the Implicit TLS operation mode of SMTP[RFC5321]. The author wants to point out that the contra arguments given in section 7 of [RFC2595] that created according POP3S and IMAPS assignments in 1999 are contradicted by operational reality in the internet, and here that includes the IETF by means of [RFC8314]. A dedicated port enables administrators to apply strict policies, for example in firewalls.¶
First of all, the equally named section of [RFC6186] (section 6) also applies to this specification.¶
Due to fact that one and a half decade passed since RFC 6186 it follows a reiteration of the reasoning. This specification avoids downgrade attacks on the opportunistic approach of STARTTLS, accomplished via the mechanism used for many other IETF standardized protocols, most notably [RFC2782] (IMAP, POP3, SUBMISSION). With its Implicit TLS capability it grants the SMTP protocol the same level of confidentiality through TLS[RFC9325] as is already standardized for the other email protocols; this is considered a value by itself, even for the possibly lesser sensitive MTA-to-MTA communication.¶
Implicit TLS reduces the number of packet roundtrips, that at a protocol stage where the widely used command pipelining[RFC2920] performance improvement extension cannot be used; these roundtrips are anachronistic (also environmentally): for example the about 4.2 million known DANE for SMTP[RFC7672] enabled domains at the time of this writing alone, which must use TLS by standard definition, likely generate (several) billion(s) of useless sequential and blocking roundtrip packets each and every day.¶
The security of DNS[RFC1035] is out of scope for this specification, but DNSSEC[RFC4033][RFC4034][RFC4035] and secure DNS transport[RFC7858][RFC8094][RFC8310][RFC8484][RFC9250] etc exists. Selection of the appropriate transport layer security protocol is out of scope for this specification, please see for example TLS[RFC9325].¶
Thanks to Jan Ingvoldstad. Thanks to Jeremy Harris for spending time and revealing the many problems of early draft variants, as well as comments on how to do it better; very special thanks to him for a kickstart implementation of this very draft in the widely used FOSS MTA Exim. Jeremy Harris, Viktor Dukhovni and Wietse Venema commented on the initial odd usage of port 0 for the STARTTLS discovery case. Thanks to Alex Brotman for hinting on the fallback strategy. Thanks have to go to Jonas Stalder, also for finding IETF tooling bugs, despite his wishes not to be mentioned (anymore).¶