<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-nurpmeso-smtp-tls-srv-08"
  ipr="trust200902"
  obsoletes=""
  updates="5321, 3207"
  submissionType="independent"
  xml:lang="en"
  version="3">
<!--
     [CHECK]  FIXME
       * category should be one of std, bcp, info, exp, historic
       * ipr should be one of trust200902, noModificationTrust200902, noDerivativesTrust200902, pre5378Trust200902
       * updates can be an RFC number as NNNN
       * obsoletes can be an RFC number as NNNN
-->
  <front>

   <title>Secure SMTP/TLS SRV Announcement</title>

   <seriesInfo name="Internet-Draft" value="draft-nurpmeso-smtp-tls-srv-08"/>

    <author fullname="Steffen Nurpmeso" initials="S" role="editor" surname="Nurpmeso">
      <address><email>steffen@sdaoden.eu</email></address>
    </author>

    <date year="2026" month="08" day="03"/>

    <area>General</area>

    <keyword>SMTP</keyword>
    <keyword>TLS</keyword>
    <keyword>Secure SMTP</keyword>
    <keyword>STARTTLS</keyword>
    <keyword>SRV</keyword>

    <abstract><t>
      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.
    </t></abstract>

  </front>
  <middle>

    <section>
      <name>Introduction</name>
      <t>
        SMTP<xref target="RFC5321"/>
        uses
        MX<xref target="RFC974"/>
        RRs to discover how to create connections to
        MTAs (<xref target="RFC5598"/>).
        The SMTP protocol default is unprotected,
        the selection of the optional and possibly unsupported
        STARTTLS<xref target="RFC3207"/>
        extension is subject to man-in-the-middle attacks.
      </t><t>
        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.
      </t><t>
        <xref target="RFC2782"/>
        defines a widely adopted DNS-based service discovery protocol.
        <xref target="RFC6186"/>
        is a specification of
        SRV<xref target="RFC2782"/>
        records for the email protocols
        IMAP<xref target="RFC9051"/>,
        POP3<xref target="RFC1939"/>,
        and
        SUBMISSION<xref target="RFC6409"/>.
        This includes DNS service names for Implicit TLS protocol variants.
      </t><t>
        This specification adds a SMTP/TLS service name for
        SRV<xref target="RFC2782"/>
        records.
        These DNS RRs should be used in preference to MX records.
        Their presence signals availability of the STARTTLS SMTP extension,
        as well as optionally Implicit TLS on a dedicated port.
      </t>

      <section>
        <name>Conventions and Terminology</name>
        <t>
          This document uses the terminology of
          The Open Group Standard Base Specifications, Issue 8,
          Volume 1, Chapter 1.6, Terminology.
        </t><t>
          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.
        </t><t>
          The term "FOSS" refers to Free and Open Source Software.
        </t>
      </section>
    </section>

    <section>
      <name>SMTP/TLS SRV Service Name</name>
      <t>
        The service name for
        TLS<xref target="RFC9325"/>
        enabled
        Secure<xref target="RFC3207"/>
        SMTP<xref target="RFC5321"/>
        is <tt>smtp-tls</tt>, the resulting DNS label <tt>_smtp-tls</tt>.
      </t><dl newline="true">
        <dt>STARTTLS</dt><dd>
          A domain that publishes an according DNS
          SRV<xref target="RFC2782"/>
          resource record announces availability of Secure SMTP,
          namely the
          STARTTLS<xref target="RFC3207"/>
          SMTP service extension on the normal
          SMTP<xref target="RFC5321"/>
          port, specified by IANA as port 25.
          The SRV RR port number shall be given as 25.
        </dd><dt>Implicit TLS</dt><dd><t>
          If the SRV RR port number is not 25,
          support for Implicit TLS on the specified port is announced.
          The port number shall be given as 842.
          Any other port number shall be treated as if port 25 was specified;
          special local policy rules may allow Implicit TLS on the given port.
        </t><t>
          Servers shall not announce STARTTLS in the EHLO command response
          of an Implicit TLS connection,
          clients shall ignore it, if they do nonetheless.
          Clients should not issue STARTTLS within an Implicit TLS connection;
          servers shall reply with code 554 if they do nonetheless, if
          enhanced status codes<xref target="RFC3463"/>
          are used, 5.5.1 shall be used.
          <!-- this behaviour reflects IMAP RFC9051 -->
        </t></dd>
      </dl><t>
        DNS SRV RRs shall take priority over
        MX<xref target="RFC5321"/>
        ones: in the presence of a SRV RR
        no MX lookup should be performed,
        and no available MX RR shall be used.
      </t><t>
        After a successful <tt>_smtp-tls</tt> DNS SRV lookup
        cleartext communication shall not be used.
        Exceptions, for example "error-recovery" connections to the dedicated
        special "local-part"
        postmaster<xref target="RFC1123"/>
        (also see
        SMTP<xref target="RFC5321"/>,
        section 4.5.1 Minimum Implementation),
        may be provided.
        Servers and clients which make use of the <tt>_smtp-tls</tt> DNS SRV
        shall follow the guidelines of
        TLS<xref target="RFC9325"/>.
      </t><t>
        If a DNS SRV lookup fails with <tt>NODATA</tt>
        negative caching<xref target="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
        <xref target="RFC2308"/>,
        section 5.)
      </t>
    </section>

    <section>
      <name>Examples</name>
      <section>
        <name>STARTTLS</name>
        <t>
          An announcement for the STARTTLS SMTP service extension.
        </t><sourcecode><![CDATA[
_smtp-tls._tcp     SRV 0 0  25 mail.example.com.
        ]]></sourcecode>
      </section>

      <section>
        <name>Implicit TLS</name>
        <t>
          An announcement of Implicit TLS, in addition to STARTTLS.
        </t><sourcecode><![CDATA[
_smtp-tls._tcp     SRV 0 0 842 mail.example.com.
        ]]></sourcecode>
      </section>

      <section>
        <name>Prioritized Server Selection</name>
        <t>
          A multi-server scenario where the main server supports
          Implicit TLS and STARTTLS,
          whereas the backup server only supports STARTTLS.
        </t><sourcecode><![CDATA[
_smtp-tls._tcp     SRV 0 0 842 mail.example.com.
_smtp-tls._tcp     SRV 1 0  25 backup.example.com.
        ]]></sourcecode>
      </section>
    </section>

    <section>
      <name>Guidance for MTAs</name>
      <t>
        If, after a successful <tt>_smtp-tls</tt> DNS SRV lookup that
        announces Implicit TLS support,
        a connection to the dedicated port fails,
        a fallback to IANA SMTP port 25 may be established,
        which shall use the STARTTLS SMTP extension.
      </t><blockquote>
        <em>Informative remark:</em>
        This is meant to overcome two shortcomings:
        first the given port may be blocked along the network path;
        it may take time until the network adapts;
        whereas expected to be a rare event for the System Ports range
        (<xref target="RFC6335"/>),
        defining a recovery strategy seems useful.
      </blockquote><blockquote>
        Second DNS SRV lookups could return results unprotected by
        DNSSEC<xref target="RFC4033"/><xref target="RFC4034"/><xref target="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.
      </blockquote><t>
        The section of
        <xref target="RFC6186"/>
        named "Guidance for MUAs" (section 4) in parts also applies to this
        specification.
      </t>
    </section>

    <section>
      <name>Guidance for Service Providers</name>
      <t>
        The equally named section of
        <xref target="RFC6186"/>
        (section 5) also applies to this specification.
      </t>
    </section>

    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>
        IANA is asked to allocate port number 842 for the Implicit TLS
        operation mode of
        SMTP<xref target="RFC5321"/>.
        The author wants to point out that the contra arguments given
        in section 7 of
        <xref target="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
        <xref target="RFC8314"/>.
        A dedicated port enables administrators to apply strict policies,
        for example in firewalls.
      </t>
    </section>

    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>
        First of all, the equally named section of
        <xref target="RFC6186"/>
        (section 6) also applies to this specification.
      </t><t>
        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
        <xref target="RFC2782"/>
        (IMAP, POP3, SUBMISSION).
        With its Implicit TLS capability it grants the SMTP protocol the same
        level of confidentiality through
        TLS<xref target="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.
      </t><t>
        Implicit TLS reduces the number of packet roundtrips,
        that at a protocol stage where the widely used
        command pipelining<xref target="RFC2920"/>
        performance improvement extension cannot be used;
        these roundtrips are anachronistic:
        for example the about 4.2 million known
        DANE for SMTP<xref target="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 of their operation.
      </t><t>
        The security of
        DNS<xref target="RFC1035"/>
        is out of scope for this specification, but
        DNSSEC<xref target="RFC4033"/><xref target="RFC4034"/><xref target="RFC4035"/>
        and secure
        DNS transport<xref target="RFC7858"/><xref target="RFC8094"/><xref target="RFC8310"/><xref target="RFC8484"/><xref target="RFC9250"/>
        etc exists.
        Selection of the appropriate transport layer security protocol
        is out of scope for this specification, please see for example
        TLS<xref target="RFC9325"/>.
      </t>
    </section>

  </middle>
  <back>

    <references>
      <name>Normative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2782.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3207.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3463.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5321.xml"/>
    </references>

    <references>
      <name>Informative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.974.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1123.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1939.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2308.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2595.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2920.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4035.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5598.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6186.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6335.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6409.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7672.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7858.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8094.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8310.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8314.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8484.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9051.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9250.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9325.xml"/>
    </references>

    <section anchor="Acknowledgements">
      <name>Acknowledgements</name>
      <t>
        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).
      </t>
    </section>

 </back>
</rfc>
<!-- vim:set tw=1000:s-ts-mode -->
