<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.3.37 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-freed-smtp-limits-00" category="std">

  <front>
    <title abbrev="LIMITS Extension">The LIMITS SMTP Service Extension</title>

    <author initials="N." surname="Freed" fullname="Ned Freed">
      <organization>Oracle</organization>
      <address>
        <email>ned.freed@mrochek.com</email>
      </address>
    </author>

    <date year="2021" month="March" day="15"/>

    <area>Art</area>
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document defines a “LIMITS” extension for the Simple Mail
Transfer Protocol (SMTP) and an associated limit registry.
This extension provides the means for an SMTP server to inform the
SMTP client of limits the server intends to apply to the protocol
during the current SMTP session. The client is then able adapt its
behavior in order to conform to those limits.</t>



    </abstract>


  </front>

  <middle>


<section anchor="problems" title="Introduction">

<t>The Simple Mail Transfer Protocol <xref target="SMTP"/> provides the ability to
transfer multiple email messages from one host to another, each with
multiple recipients, using a single or multiple connections.</t>

<t>In order to conserve resources as well as protect themselves from
malicious clients, it is necessary for servers to enforce limits
on various aspects of the protocol, e.g., a limit on the number
of recipients that can be specified in a single transaction.</t>

<t>Additionally, servers may also wish to alter the limits they
apply depending on their assessment of the reputation of a particular
client.</t>

<t>The variability of the limits that may be in effect creates a
situation where clients may inadvertently exceed a particular server’s
limits, causing servers to respond with temporary (or in some
cases, permanent) errors. This in turn can lead to delays or even
failures in message transfer.</t>

<t>The “LIMITS” extension provides the means for a server
to inform a client about specific limits in effect for
a particular SMTP session. This information, combined with the
inherent flexibility of SMTP, makes it possible for clients
to avoid server errors and the problems they cause.</t>

<t>Limits are registered with the IANA. Each registration includes
the limit name, value syntax, and a description of its semantics.</t>

</section>
<section anchor="Terminology" title="Terminology">

<t>In this document, the key words “MUST”, “MUST NOT”, “REQUIRED”,
“SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”,
and “OPTIONAL” are to be interpreted as described in BCP 14, RFC 2119
<xref target="KEYWORDS"/>.</t>

<t>This specification uses the Augmented Backus-Naur Form
<xref target="ABNF"/> notation and its core rules to define the
formal syntax of the “LIMITS” extension.</t>

<t>This specification makes extensive use of the terminology specified
and used in <xref target="SMTP"/>.</t>

</section>
<section anchor="Extension" title="The “LIMITS” SMTP Extension">

<t>Extensions to SMTP are defined in Section 2.2 of <xref target="SMTP"/>.</t>

<t>The name of the extension is “LIMITS”. Servers implementing this
extension advertise an additional EHLO keyword of “LIMITS”. The
associated parameter is used by the server to communicate one or
more limits, each with an optional value, to the client. The syntax
of the parameter is:</t>

<figure><artwork type="abnf"><![CDATA[
  limits-param = limit-name-value [";" limit-name-value]
  limit-name-value = limit-name ["=" limit-value]
  limit-name = 1*(ALPHA / DIGIT / "-" / "_")
  limit-value = 1*(%x21-3A / %x3C-7E) ; Any VCHAR except ";"

]]></artwork></figure>

<t>This extension introduces no new SMTP commands, and does not
alter any existing command. However, it is possible for a
LIMITS parameter to be associated with another SMTP extension
that does these things.</t>

<section anchor="limits" title="Limits">

<t>In order to achieve consistent behavior, all limits MUST be
registered with the IANA, as described below.</t>

</section>
<section anchor="limit-naming-conventions" title="Limit Naming Conventions">

<t>Limit names MUST be comprehensible, but also should
be kept as short as possible. The use of commonly understood
abbreviation, e.g., “MAX” for “maximum”, is encouraged.</t>

<t>When a limit is associated with a particular SMTP, its name
SHOULD begin with the name of that command.</t>

<t>Limit names SHOULD end with one or more terms that describe
the type of limit.</t>

</section>
<section anchor="multiple-ehlo-commands" title="Multiple EHLO Commands">

<t>SMTP requires that EHLO command be reissued Under certain
circumstances, e.g., after successful authentication <xref target="AUTH"/>
or negotiation of a security layer <xref target="STARTTLS"/>.</t>

<t>Servers MAY update their limits any time the protocol requires
clients to reissue the EHLO command. Clients MUST discard any
previous limits in favor of those provided by the most recent
EHLO. This includes the case where the original EHLO provided
a set of limits but the subsequent EHLO did not; in this
case the client MUST act as if no limits were communicated.</t>

</section>
</section>
<section anchor="initial-limits" title="Initial Limits">

<t>An initial set of limits are specified in the following sections.</t>

<section anchor="mailmax-limit" title="MAILMAX Limit">

<t>Name: MAILMAX</t>

<t>Value syntax: 1*DIGIT</t>

<t>Description: RCPTMAX specifies the maximum number of transactions
(MAIL FROM commands) the SMTP will accept in a single session.</t>

<t>Security Considerations: See <xref target="Seccons"/></t>

</section>
<section anchor="rcptmax-limit" title="RCPTMAX Limit">

<t>Name: RCPTMAX</t>

<t>Value syntax: 1*DIGIT</t>

<t>Description: RCPTMAX specifies the maximum number of RCPT TO commands
the SMTP will accept in a single transaction.</t>

<t>Security Considerations: See <xref target="Seccons"/></t>

</section>
<section anchor="rcptdomainmax-limit" title="RCPTDOMAINMAX Limit">

<t>Name: RCPTDOMAINMAX</t>

<t>Value syntax: 1*DIGIT</t>

<t>Description: RCPTMAX specifies the maximum number of different domains
that can appear in a recipient (RCPT TO) address within a single
SMTP session. This limit is imposed by some servers that bind to
a specific internal delivery mechanism on receipt of the first
RCPT TO command.</t>

<t>Security Considerations: See <xref target="Seccons"/></t>

</section>
</section>
<section anchor="Seccons" title="Security Considerations">

<t>A malicious server can use limits to overly constrain client behavior,
causing excessive use of client resources.</t>

<t>A malicious client may use the limits a server advertises to optimize
the delivery of unwanted messages.</t>

<t>A man-in-the-middle attack on unprotected SMTP connections can
be used to cause clients to misbehave, which in turn could result
in delivery delays or failures. Loss of reputation for the client
could also occur.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<section anchor="smtp-service-extension-registry" title="SMTP Service Extension Registry">

<t>The IANA is requested to add “LIMITS” to the SMTP Service
Extension Registry:</t>

<figure><artwork><![CDATA[
Keywords: LIMITS
Description: Server limits
Reference: [RFCxxxx]

]]></artwork></figure>

</section>
<section anchor="smtp-server-limits-registry" title="SMTP Server Limits Registry">

<t>The IANA is requested to create a new registry for SMTP
server limits. The policy for this registry is “Specification Required”.
Registry entries consist of three required values:</t>

<t><list style="numbers">
  <t>The name of the limit</t>
  <t>The syntax of the limit value, if the limit has one. Use of <xref target="ABNF"/>
is preferred but not required.</t>
  <t>A description of the limit’s semantics</t>
  <t>Security considerations for the limit</t>
</list></t>

<t>The IANA is also requested to register the limits specified in
this document.</t>

</section>
</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor='KEYWORDS' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname='S. Bradner' initials='S.' surname='Bradner'><organization/></author>
<date month='March' year='1997'/>
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference anchor='ABNF' target='https://www.rfc-editor.org/info/rfc5234'>
<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author fullname='D. Crocker' initials='D.' role='editor' surname='Crocker'><organization/></author>
<author fullname='P. Overell' initials='P.' surname='Overell'><organization/></author>
<date month='January' year='2008'/>
<abstract><t>Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='STD' value='68'/>
<seriesInfo name='RFC' value='5234'/>
<seriesInfo name='DOI' value='10.17487/RFC5234'/>
</reference>



<reference anchor='SMTP' target='https://www.rfc-editor.org/info/rfc5321'>
<front>
<title>Simple Mail Transfer Protocol</title>
<author fullname='J. Klensin' initials='J.' surname='Klensin'><organization/></author>
<date month='October' year='2008'/>
<abstract><t>This document is a specification of the basic protocol for Internet electronic mail transport.  It consolidates, updates, and clarifies several previous documents, making all or parts of most of them obsolete.  It covers the SMTP extension mechanisms and best practices for the contemporary Internet, but does not provide details about particular extensions.  Although SMTP was designed as a mail transport and delivery protocol, this specification also contains information that is important to its use as a &quot;mail submission&quot; protocol for &quot;split-UA&quot; (User Agent) mail reading systems and mobile environments.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5321'/>
<seriesInfo name='DOI' value='10.17487/RFC5321'/>
</reference>




    </references>

    <references title='Informative References'>





<reference anchor='STARTTLS' target='https://www.rfc-editor.org/info/rfc3207'>
<front>
<title>SMTP Service Extension for Secure SMTP over Transport Layer Security</title>
<author fullname='P. Hoffman' initials='P.' surname='Hoffman'><organization/></author>
<date month='February' year='2002'/>
<abstract><t>This document describes an extension to the SMTP (Simple Mail Transfer Protocol) service that allows an SMTP server and client to use TLS (Transport Layer Security) to provide private, authenticated communication over the Internet.  This gives SMTP agents the ability to protect some or all of their communications from eavesdroppers and attackers.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='3207'/>
<seriesInfo name='DOI' value='10.17487/RFC3207'/>
</reference>



<reference anchor='AUTH' target='https://www.rfc-editor.org/info/rfc4954'>
<front>
<title>SMTP Service Extension for Authentication</title>
<author fullname='R. Siemborski' initials='R.' role='editor' surname='Siemborski'><organization/></author>
<author fullname='A. Melnikov' initials='A.' role='editor' surname='Melnikov'><organization/></author>
<date month='July' year='2007'/>
<abstract><t>This document defines a Simple Mail Transport Protocol (SMTP) extension whereby an SMTP client may indicate an authentication mechanism to the server, perform an authentication protocol exchange, and optionally negotiate a security layer for subsequent protocol interactions during this session.  This extension includes a profile of the Simple Authentication and Security Layer (SASL) for SMTP.</t><t>This document obsoletes RFC 2554.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4954'/>
<seriesInfo name='DOI' value='10.17487/RFC4954'/>
</reference>




    </references>



  </back>

<!-- ##markdown-source:
H4sIABV1T2AAA61Za28bNxb9zl9BaFE0WUhaP1IUUVBgVdtZG/UjayvtFkVR
UDOURWRmqCU5ttXA+9v33EtyZmQnQQtUQGtphuR9n3suM5lMRDCh0jO5WGt5
fnZxtriRNxeLd/JGuztTaHnyEHTjjW2EWi6dvpvlVf2L0haNqnFG6dQqTFZO
63Li67CZVKY2wU/29kSpAhYc7B3sT/YOJ/vfiAIPbq3bzqQPpRBm42YyuNaH
g72913sHQjmtZnLugvigt/fWlTN51gTtGh0mxyRHCB9UU/6mKtvg6K32YmNm
8hdvXXB65cfSb2v68qsQqg1r62ZCToTExzR+Ji+n8i1pyk+i/pe6HDyz7lY1
5ncVYONMXjlVVJpf6FqZaiYbXU7Z1n/WzhZr/WFa2FqIxroae+40xMkfTn7+
6er6+GYmr98eHezvv8az+feXb/n3NweHr/Cb3B1/Hx7swxPNanjCzWJ+vVic
xxMOD/a+pRPeL07596vX39AJYjKZSLX0ATrCL4u18RJBaWvdBFnqlWm0l0qO
YuRGUufQSYiSAZG/MfWm0vIChomFU41faSffORtsYSv5glR8KeFt/CeV97Yw
CF8pOb7S6VsD2dtplNyfvnH2zpSQTSJqjWNZIM7gFPNIMYgJVkabaZngN0Vl
SHW7ihLiAWm5QRY0padtarOptvSFXm+StqJsnWlu+VnROkcHJXGetJpyqicJ
ho+GTUtYr0q1waPgxVKv1Z2xJAxpUEYlC5u0JHnW66TbVLD7a1OWyA+BJHW2
bAvKGpk+H/8G5SCh9o/iu8GHQrXje/nc9x8/kvKPj7vOVEtTmUC2i5C31G0V
DJ3E+Ql/e69usX7lbC1RIxJKB3ZbY3GGG0utirW8N2Etur1OF2ZDrkH9tJ78
qCT9wSs7EAFfNJptJPvPdr3EgcJJ3rauoMzz8l5XFf2lIGEf2VB7Xd0l9USt
KlMY2/oUGEg3HB1IITvcljMnpgDHXlMwihwEAWffKcc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