Internet Engineering Task Force                         S. Nurpmeso, Ed.
Internet-Draft                                          13 February 2025
Updates: 5321, 3207 (if approved)                                       
Intended status: Informational                                          
Expires: 17 August 2025


                    Secure SMTP/TLS SRV Announcement
                     draft-nurpmeso-smtp-tls-srv-05

Abstract

   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.

Status of This Memo

   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 17 August 2025.

Copyright Notice

   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.





Nurpmeso                 Expires 17 August 2025                 [Page 1]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Conventions and Terminology . . . . . . . . . . . . . . .   2
   2.  SMTP/TLS SRV Service Name . . . . . . . . . . . . . . . . . .   3
   3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     3.1.  STARTTLS  . . . . . . . . . . . . . . . . . . . . . . . .   3
     3.2.  Implicit TLS  . . . . . . . . . . . . . . . . . . . . . .   4
     3.3.  Prioritized Server Selection  . . . . . . . . . . . . . .   4
   4.  Guidance for MTAs . . . . . . . . . . . . . . . . . . . . . .   4
   5.  Guidance for Service Providers  . . . . . . . . . . . . . . .   5
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   6
   Appendix A.  Rationale  . . . . . . . . . . . . . . . . . . . . .   9
   Appendix B.  Acknowledgements . . . . . . . . . . . . . . . . . .  10
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  10

1.  Introduction

   [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])
   are yet excluded from their share on the widely supported SRV record,
   at least from the IETF point of view.  (According usage however
   exists for many years, see for example the German De-Mail definition
   law; and in recent years notable FOSS MTA implementations gained
   support for SRV lookups.)  Moreover, no Implicit TLS SMTP protocol
   variant has ever been specified by the IETF, even though the
   achievable non-batchable packet roundtrip savings for the SMTP
   protocol are immense, and despite the fact that many (most FOSS) SMTP
   implementations already have, or can easily implement, built-in
   support for this mode.  This specification adds a SMTP/TLS service
   name for SRV[RFC2782] records.

1.1.  Conventions and Terminology

   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.





Nurpmeso                 Expires 17 August 2025                 [Page 2]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


   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.

2.  SMTP/TLS SRV Service Name

   The service name for TLS[RFC9325] enabled Secure[RFC3207]
   SMTP[RFC5321] is smtp-tls, the resulting DNS label _smtp-tls.

   STARTTLS
      Whenever a domain publishes an according DNS SRV[RFC2782] resource
      record it asserts availability of Secure SMTP, that is, of the
      STARTTLS[RFC3207] SMTP service extension on the normal
      SMTP[RFC5321] port, specified by IANA as port 25.  The port number
      MUST be given as 25.

   Implicit TLS
      If the port number of the published SRV resource record does not
      equal the IANA port 25,0 the domain announces support for Implicit
      TLS on the given port in addition to STARTTLS[RFC3207] support on
      the IANA port.  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].

3.  Examples

3.1.  STARTTLS

   This example announces support for the STARTTLS SMTP service
   extension.

   _smtp-tls._tcp     SRV 0 0 25 mail.example.com.





Nurpmeso                 Expires 17 August 2025                 [Page 3]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


3.2.  Implicit TLS

   This example specifies port number 842 to indicate an Implicit TLS
   port in addition to the STARTTLS SMTP service extension.

   _smtp-tls._tcp     SRV 0 0 842 mail.example.com.

3.3.  Prioritized Server Selection

   A multi-server scenario where the main server supports Implicit TLS,
   and 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.

4.  Guidance for MTAs

   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 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 recover 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, if at all applicable, for example by treating
   |  it as a negative result ([RFC2308]).  The mail log record may give
   |  useful insight.  If the STARTTLS secured connection succeeds, it
   |  may make sense to add a caching mechanism in order to avoid
   |  retrying Implicit TLS in situations where connections repeatedly
   |  cannot be established.

   The section of [RFC6186] named "Guidance for MUAs" (section 4) in
   parts also applies to this specification.







Nurpmeso                 Expires 17 August 2025                 [Page 4]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


5.  Guidance for Service Providers

   The equally named section of [RFC6186] (section 5) also applies to
   this specification.

6.  IANA Considerations

   The author does not expect IANA to add a dedicated port for "Implicit
   TLS SMTP", given that it has registered according ones for other
   email protocols, for example POP3S, no sooner but 1999, a quarter of
   a century ago.  The author nonetheless asks for assigning a dedicated
   port for Implicit TLS SMTP, and suggests port 842 in the System Ports
   range.  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.

7.  Security Considerations

   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; it must be said that today
   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].

8.  References



Nurpmeso                 Expires 17 August 2025                 [Page 5]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


8.1.  Normative References

   [RFC2782]  Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for
              specifying the location of services (DNS SRV)", RFC 2782,
              DOI 10.17487/RFC2782, February 2000,
              <https://www.rfc-editor.org/info/rfc2782>.

   [RFC3207]  Hoffman, P., "SMTP Service Extension for Secure SMTP over
              Transport Layer Security", RFC 3207, DOI 10.17487/RFC3207,
              February 2002, <https://www.rfc-editor.org/info/rfc3207>.

   [RFC3463]  Vaudreuil, G., "Enhanced Mail System Status Codes",
              RFC 3463, DOI 10.17487/RFC3463, January 2003,
              <https://www.rfc-editor.org/info/rfc3463>.

   [RFC5321]  Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
              DOI 10.17487/RFC5321, October 2008,
              <https://www.rfc-editor.org/info/rfc5321>.

8.2.  Informative References

   [RFC1035]  Mockapetris, P., "Domain names - implementation and
              specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
              November 1987, <https://www.rfc-editor.org/info/rfc1035>.

   [RFC1939]  Myers, J. and M. Rose, "Post Office Protocol - Version 3",
              STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996,
              <https://www.rfc-editor.org/info/rfc1939>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC2308]  Andrews, M., "Negative Caching of DNS Queries (DNS
              NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998,
              <https://www.rfc-editor.org/info/rfc2308>.

   [RFC2595]  Newman, C., "Using TLS with IMAP, POP3 and ACAP",
              RFC 2595, DOI 10.17487/RFC2595, June 1999,
              <https://www.rfc-editor.org/info/rfc2595>.

   [RFC2920]  Freed, N., "SMTP Service Extension for Command
              Pipelining", STD 60, RFC 2920, DOI 10.17487/RFC2920,
              September 2000, <https://www.rfc-editor.org/info/rfc2920>.






Nurpmeso                 Expires 17 August 2025                 [Page 6]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


   [RFC4033]  Arends, R., Austein, R., Larson, M., Massey, D., and S.
              Rose, "DNS Security Introduction and Requirements",
              RFC 4033, DOI 10.17487/RFC4033, March 2005,
              <https://www.rfc-editor.org/info/rfc4033>.

   [RFC4034]  Arends, R., Austein, R., Larson, M., Massey, D., and S.
              Rose, "Resource Records for the DNS Security Extensions",
              RFC 4034, DOI 10.17487/RFC4034, March 2005,
              <https://www.rfc-editor.org/info/rfc4034>.

   [RFC4035]  Arends, R., Austein, R., Larson, M., Massey, D., and S.
              Rose, "Protocol Modifications for the DNS Security
              Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005,
              <https://www.rfc-editor.org/info/rfc4035>.

   [RFC5598]  Crocker, D., "Internet Mail Architecture", RFC 5598,
              DOI 10.17487/RFC5598, July 2009,
              <https://www.rfc-editor.org/info/rfc5598>.

   [RFC6186]  Daboo, C., "Use of SRV Records for Locating Email
              Submission/Access Services", RFC 6186,
              DOI 10.17487/RFC6186, March 2011,
              <https://www.rfc-editor.org/info/rfc6186>.

   [RFC6335]  Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S.
              Cheshire, "Internet Assigned Numbers Authority (IANA)
              Procedures for the Management of the Service Name and
              Transport Protocol Port Number Registry", BCP 165,
              RFC 6335, DOI 10.17487/RFC6335, August 2011,
              <https://www.rfc-editor.org/info/rfc6335>.

   [RFC6409]  Gellens, R. and J. Klensin, "Message Submission for Mail",
              STD 72, RFC 6409, DOI 10.17487/RFC6409, November 2011,
              <https://www.rfc-editor.org/info/rfc6409>.

   [RFC6698]  Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
              of Named Entities (DANE) Transport Layer Security (TLS)
              Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August
              2012, <https://www.rfc-editor.org/info/rfc6698>.

   [RFC7250]  Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
              Weiler, S., and T. Kivinen, "Using Raw Public Keys in
              Transport Layer Security (TLS) and Datagram Transport
              Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
              June 2014, <https://www.rfc-editor.org/info/rfc7250>.






Nurpmeso                 Expires 17 August 2025                 [Page 7]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


   [RFC7672]  Dukhovni, V. and W. Hardaker, "SMTP Security via
              Opportunistic DNS-Based Authentication of Named Entities
              (DANE) Transport Layer Security (TLS)", RFC 7672,
              DOI 10.17487/RFC7672, October 2015,
              <https://www.rfc-editor.org/info/rfc7672>.

   [RFC7858]  Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
              and P. Hoffman, "Specification for DNS over Transport
              Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May
              2016, <https://www.rfc-editor.org/info/rfc7858>.

   [RFC8094]  Reddy, T., Wing, D., and P. Patil, "DNS over Datagram
              Transport Layer Security (DTLS)", RFC 8094,
              DOI 10.17487/RFC8094, February 2017,
              <https://www.rfc-editor.org/info/rfc8094>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8310]  Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles
              for DNS over TLS and DNS over DTLS", RFC 8310,
              DOI 10.17487/RFC8310, March 2018,
              <https://www.rfc-editor.org/info/rfc8310>.

   [RFC8314]  Moore, K. and C. Newman, "Cleartext Considered Obsolete:
              Use of Transport Layer Security (TLS) for Email Submission
              and Access", RFC 8314, DOI 10.17487/RFC8314, January 2018,
              <https://www.rfc-editor.org/info/rfc8314>.

   [RFC8461]  Margolis, D., Risher, M., Ramakrishnan, B., Brotman, A.,
              and J. Jones, "SMTP MTA Strict Transport Security (MTA-
              STS)", RFC 8461, DOI 10.17487/RFC8461, September 2018,
              <https://www.rfc-editor.org/info/rfc8461>.

   [RFC8484]  Hoffman, P. and P. McManus, "DNS Queries over HTTPS
              (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018,
              <https://www.rfc-editor.org/info/rfc8484>.

   [RFC9051]  Melnikov, A., Ed. and B. Leiba, Ed., "Internet Message
              Access Protocol (IMAP) - Version 4rev2", RFC 9051,
              DOI 10.17487/RFC9051, August 2021,
              <https://www.rfc-editor.org/info/rfc9051>.

   [RFC9250]  Huitema, C., Dickinson, S., and A. Mankin, "DNS over
              Dedicated QUIC Connections", RFC 9250,
              DOI 10.17487/RFC9250, May 2022,
              <https://www.rfc-editor.org/info/rfc9250>.



Nurpmeso                 Expires 17 August 2025                 [Page 8]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


   [RFC9325]  Sheffer, Y., Saint-Andre, P., and T. Fossati,
              "Recommendations for Secure Use of Transport Layer
              Security (TLS) and Datagram Transport Layer Security
              (DTLS)", BCP 195, RFC 9325, DOI 10.17487/RFC9325, November
              2022, <https://www.rfc-editor.org/info/rfc9325>.

   [RFC9460]  Schwartz, B., Bishop, M., and E. Nygren, "Service Binding
              and Parameter Specification via the DNS (SVCB and HTTPS
              Resource Records)", RFC 9460, DOI 10.17487/RFC9460,
              November 2023, <https://www.rfc-editor.org/info/rfc9460>.

Appendix A.  Rationale

   Plenty of methods have been standardized by the IETF to perform
   service TLS capability discovery for SMTP.  They have in common that
   they represent SMTP specific solutions to a problem that other
   protocols address by means this document thus reiterates for SMTP.
   They represent further development effort and error surfaces.  They
   also impose increased permanent administration effort, and, due to
   this, are inaccessible to a large number, if not the majority, of
   private email server operators: either through additional costs, the
   impossibility to set up a dedicated name server, if so required, and,
   also as a superset of the former, restrictive web interfaces that
   support only a minimal set of DNS[RFC1035] resource record types.
   Regardless the fact that several of these extensions switch the SMTP
   protocol to a MUST usage of TLS, they still require the additional
   STARTTLS plus EHLO roundtrips that for example [RFC8314] disregards;
   and even though that RFC explicitly refers to DANE for SMTP[RFC7672],
   giving no reason for why SMTP "requires a different approach", except
   for the TLS certificate discovery that could and should be hoped for
   as a general solution, including for clients for any sort of network
   protocol, DANE falls in this category, too: what this specification
   tries to achieve is therefore not counteracting [RFC7672], but
   accompanying it; the author wants to state again that according
   mechanisms already exist in active use, and that many SMTP client/
   server software implementations already support SRV RR lookups:
   activating this existing code base by standard means is only a
   consequence.

   The other extension that [RFC8314] mentions, MTA-STS[RFC8461],
   requires SMTP operators to install and maintain an additional HTTP
   protocol server, accessible on the usual HTTP/S ports and the same
   domain as the email service.  Dependent on the software this may
   require non-trivial and error prone path access policy server rules.
   It is an approach that is complicated to implement, and that brings
   the complexity of another network protocol in the SMTP path; given
   that several different HTTP protocol exist, which in turn base upon
   several different transport protocols, the complexity and protocol is



Nurpmeso                 Expires 17 August 2025                 [Page 9]

Internet-Draft      Secure SMTP/TLS SRV Announcement       February 2025


   alien to SMTP.  The SVCB[RFC9460] DNS approach would not bring
   additional value to the problem in question, but on the other hand
   requires additional implementation efforts as email protocols do not
   make any use of it as of today.

   Coming back to DANE for SMTP[RFC7672] it must be said that
   unfortunately DNSSEC[RFC4033][RFC4034][RFC4035] is still consciously
   unsupported by major players as of today.  Furthermore provider web
   interfaces do often not allow users creation of the necessary DANE
   TLSA resource records: not always can the answer be "run your own
   name server", also letting aside the administrative effort of doing
   so.  However, discovering an Implicit TLS enabled email service via
   the _smtp-tls._tcp SRV record, thereafter checking for applicability
   of DNS-Based Authentication of Named Entities (DANE)[RFC6698],
   possibly even Using Raw Public Keys in Transport Layer Security
   (TLS)[RFC7250] would be a bright future that addresses possibly all
   of today's issues.

Appendix B.  Acknowledgements

   Thanks to Jan Ingvoldstad for remarks on the missing rationale.
   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.  Many thanks to Jonas Stalder
   for dozens of corrections and suggestions, and also for finding IETF
   tooling bugs.

Author's Address

   Steffen Nurpmeso (editor)
   Email: steffen@sdaoden.eu
















Nurpmeso                 Expires 17 August 2025                [Page 10]