<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc strict="yes"?>
<?rfc symrefs="yes"?>
<?rfc linkmailto="no"?>
<rfc ipr="trust200902" category="std" 
     updates="1939, 3464, 3501, 6186, 6409"
     docName="draft-newman-email-deep-01.txt">
<front>
<title>Deployable Enhanced Email Privacy (DEEP)</title>
<author fullname="Keith Moore" initials="K" surname="Moore">
  <organization>Network Heretics</organization>
  <address>
    <postal>
      <street>PO Box 1934</street>
      <city>Knoxville</city>
      <region>TN</region>
      <country>US</country>
      <code>37901</code>
    </postal>
    <email>moore@network-heretics.com</email>
  </address>
</author>
<author initials="C." surname="Newman" fullname="Chris Newman">
 <organization>Oracle</organization>
 <address>
  <postal>
   <street>440 E. Huntington Dr., Suite 400</street>
   <city>Arcadia</city>
   <region>CA</region>
   <code>91006</code>
   <country>US</country>
  </postal>
  <email>chris.newman@oracle.com</email>
 </address>
</author>
<date month="February" year="2014" />
<area>Applications</area>
<keyword>I-D</keyword>
<keyword>Internet-Draft</keyword>
<abstract><t>
This specification defines a set of requirements and facilities designed to improve email privacy. The focus of this proposal is to provide mechanisms intended to increase use of already deployed Transport Layer Security (TLS) technology and enable deployment and use of stronger cipher suites for email protocols.
</t></abstract>
</front>
<middle>
<section title="Introduction">
<t>
Software that provides email service via Internet Message Access
Protocol (IMAP) <xref target="RFC3501"/>, Post Office Protocol (POP)
<xref target="RFC1939"/> and/or Simple Mail Transfer Protocol (SMTP)
<xref target="RFC5321"/> usually has Transport Layer Security (TLS)
<xref target="RFC5246"/> support but often does not use it in a way that
maximizes end-user privacy. This specification proposes changes to email
software and deployments intended to increase the use of TLS and record
when that use occurs.
</t>
<t>In brief, this memo now recommends that:
<list style="symbols">
<t>TLS on a well-known port ("Implicit TLS") be supported for IMAP, POP,
and SMTP Submission <xref target="RFC6409"/> for all electronic mail
user agents (MUAs), servers, and service providers;</t>

<t>MUAs require use of TLS for all newly configured accounts unless the
user has explicitly agreed to allow their mail traffic for that account
to be insecure;</t>

<t>MUAs and mail protocol servers cooperate (via mechanisms defined in
this specification) to upgrade security feature use and record that
usage.</t>
</list>
</t>
<t>Improved use of TLS with SMTP for message relaying is described in a
separate document <xref target="I-D.ietf-dane-smtp-with-dane"/>.</t>
<t>The recommendations in this memo do not replace the functionality
of, and are not intended as a substitute for, end-to-end encryption of
electronic mail.</t>
<t>
This is an early draft and is subject to change. Implementation of this proposal is not recommended at this time.
</t>
</section>

<section title="Conventions and Terminology Used in This Document">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be 
interpreted as described in <xref target="RFC2119"/>.</t>
<t>This specification expresses syntax using the Augmented Backus-Naur
Form (ABNF) as described in <xref target="RFC5234"/>, including the core rules in Appendix B and rules from <xref target="RFC5322"/>.</t>
<t>In examples, "C:" and "S:" indicate lines sent by the client and
server respectively. If a single "C:" or "S:" label applies to multiple
lines, then the line breaks between those lines are for editorial
clarity only and are not part of the actual protocol exchange.</t>

<section title="Mail Account Configuration">
<t>
A mail user agent (MUA) connects to IMAP, POP and/or SMTP Submission
servers to access email service on behalf of a user.  Each of these
services typically requires authentication to a specific "account"
which is uniquely associated with a user who is authorized to utilize
the service.</t>
<t>Account configuration occurs when an MUA is first used to access a
particular service, when a user wishes to access or submit mail
through servers in addition to those specified or found during first
use, or when a user explictly requests to change account configuration
parameters such as server names, user names, passwords, client
certificates, etc.  Account configuration can be entirely manual
(entering server names explicitly) or partially automated via a
mechanism such as DNS SRV records <xref target="RFC6186"/>.
</t>
</section>

</section>

<section anchor="tls-implicit" title="Implicit TLS">
<t>
Previous standards for use of email protocols with TLS used the STARTTLS
mechanism: <xref target="RFC2595"/>, <xref target="RFC3207"/>, and <xref
target="RFC3501"/>. With STARTTLS, the client establishes a clear text
application session and determines whether to issue a STARTTLS command
based on server capabilities and client configuration. If the client
issues a STARTTLS command, a TLS handshake follows that can upgrade the
connection. While this mechanism has deployed, an alternate mechanism
where TLS is negotiated immediately at connection start on a separate
port (refered to in this document as "Implicit TLS") has deployed more
successfully. To increase use of TLS, this specification recommends use
of implicit TLS by new POP, IMAP and SMTP Submission software.
</t>
<section title="Implicit TLS for POP">
<t>
When a TCP connection is established for the "pop3s" service (default
port 995), a TLS handshake begins immediately. Clients MUST implement
the certificate validation mechanism described in <xref
target="I-D.melnikov-email-tls-certs"/>. Once the TLS session is
established, POP3 <xref target="RFC1939"/> protocol messages are
exchanged as TLS application data for the remainder of the TCP
connection. After the server sends a +OK greeting, the server and
client MUST enter AUTHORIZATION state, even if client credentials were
supplied during the TLS handshake.
</t>
<t>
See <xref target="clientcert"/> for additional information on client
certificate authentication. See <xref target="iana-pop3s"/> for port
registration information.
</t>
</section>
<section title="Implicit TLS for IMAP">
<t>
When a TCP connection is established for the "imaps" service (default
port 993), a TLS handshake begins immediately. Clients MUST implement
the certificate validation mechanism described in <xref
target="RFC3501"/> and SHOULD implement the certificate validation
mechanism described in <xref
target="I-D.melnikov-email-tls-certs"/>. Once the TLS session is
established, IMAP <xref target="RFC3501"/> protocol messages are
exchanged as TLS application data for the remainder of the TCP
connection. If client credentials were provided during the TLS
handshake that the server finds acceptable, the server MAY issue a
PREAUTH greeting in which case both the server and client enter
AUTHENTICATED state. If the server issues an OK greeting then both
server and client enter NOT AUTHENTICATED state.
</t>
<t>
See <xref target="clientcert"/> for additional information on client
certificate authentication. See <xref target="iana-imaps"/> for port
registration information.
</t>
</section>
<section title="Implicit TLS for SMTP Submission">
<t>
When a TCP connection is established for the "submissions" service
(default port 465), a TLS handshake begins immediately. Clients MUST
implement the certificate validation mechanism described in <xref
target="I-D.melnikov-email-tls-certs"/>. Once a TLS session is
established, message submission protocol data <xref target="RFC6409"/>
is exchanged as TLS application data for the remainder of the TCP
connection.  (Note: the "submissions" service name is defined in
section 10.3 of this document, and follows the usual convention that
the name of a service layered on top of Implicit TLS consists of the
name of the service as used without TLS, with an "s" appended.)
</t>
<t>
See <xref target="clientcert"/> for additional information on client
certificate authentication. See <xref target="iana-submissions"/> for port
registration information.
</t>
</section>
<section title="Implicit TLS Connection Closure for POP, IMAP and SMTP">
<t>
When a client or server wishes to close the connection, it SHOULD
initiate the exchange of TLS close alerts before TCP connection
termination. The client MAY, after sending a TLS close alert, gracefully
close the TCP connection without waiting for a TLS response from the
server.
</t>
</section>
</section>

<section title="Email Security Upgrading Using Security Latches">
<t>
Once an improved email security or privacy mechanism is deployed and
ready for general use, it is desirable to continue using it for all
future email service. For example, TLS is widely deployed in email
software, but use of TLS is often not required. Currently deployed
mail user agents (MUAs) <xref target="RFC5598"/> usually make a
determination if TLS is available when an account is first configured
and may require use of TLS with that account if and only if it was
initially available. If the service provider makes TLS available after
initial client configuration, many MUAs will not notice the change.
</t>
<t>
Alternatively, a security feature may be purely opportunisitic and thus
subject to downgrade attacks. For example, if the TLS client offers to
use a cipher suite with perfect-forward-secrecy and the TLS server
selects that cipher, a higher level of privacy is achieved for that one
connection, but an active attack could cause the loss of that property
without the client or user being aware of the privacy loss.
</t>
<t>
This section describes a mechanism, known as "security latches", which
is designed to permit an MUA to recognize when a server has committed
to upgrade its security features, and that it's safe for the client to
change its configuration for that account to require that such
features be present in future sessions with that server.  The purpose
in making it explicit when a client can expect new security features
to be maintained by a server, is to permit security to be upgraded
over time while also minimizing the potential for false positive
reports of a downgrade attack due to temporary or "provisional" use of
new features on a server.
</t>
<section title="Email Security Tags">
<t>
Each security latch is given a name known as an email security tag.
An email security tag is a short alphanumeric token that represents a
security facility that was used by an IMAP, POP or SMTP Submission
session. Clients SHOULD provide the ability to determine whether a
particular server supports named security facilities (based on
successful negotiation and use of those features in a session with
that server).  If the server advertises those security facilities as
"normal" and not "provisional", such clients SHOULD associate the
appropriate security tags with a server's host identifier (prior to
DNS lookup) and save that information persistently with account
configuration. The client SHOULD then require that the security
facilities indicated by the stored security tags be required for
subsequent connections between that client and that server. When a
security tag is stored in this way, it is said to be "latched" and
will convert an active downgrade attack attempting to violate privacy
into a denial-of-service attack. For this privacy protection to work
as desired clients MUST NOT offer a "click ok to proceed" dialog when
unable to achieve connection security matching the latched security
tags.
</t>
<t>
An identifier for a security tag has the following formal syntax:
<figure>
<artwork type="abnf">
  security-tag  =  ALPHA *63(ALPHA / DIGIT / "-" / "_")
</artwork>
</figure>
</t>
</section>
<section anchor="sec-tag-initial" title="Initial Set of Email Security Tags">
<t>This section describes an initial set of email security tags. The IANA Considerations <xref target="iana"/> defines a registry so that more tags can be defined in the future.
<list style="hanging">
<t hangText="tls10">This security tag indicates that TLS version 1.0 <xref target="RFC2246"/> or later was negotiated successfully including negotiation of a strong encryption layer with a symmetric key of at least 128 bits. This tag does not indicate that the server certificate was valid.</t>
<t hangText="tls12">This security tag indicates that TLS version 1.2 <xref target="RFC5246"/> or later was negotiated successfully including negotiation of a strong encryption layer with a symmetric key of at least 128 bits. This tag does not indicate that the server certificate was valid.</t>
<t hangText="tls-cert">This security tag indicates that TLS was successfully negotiated and the server certificate was successfully verified by the client using the verification algorithm appropriate for the protocol (see <xref target="tls-implicit"/>).</t>
<t hangText="tls-dane-tlsa">This security latch indicates the TLS server certificate was verified using the procedures described in "The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA" <xref target="RFC6698"/>.</t>
<t hangText="tls-pfs">This security latch indicates that a TLS cipher
suite was negotiated that included the "perfect forward secrecy"
property. In general, TLS IANA registered cipher suites beginning with
TLS_DHE_ or TLS_ECDHE_ have this property.</t>
</list>
</t>
</section>
<section title="Server DEEP Status">
<t>
In order to mitigate false positive reports of a security or privacy
reduction, servers SHOULD advertise a DEEP status. This indicates the server
is in either "provisional" or "normal" state, and can provide an https Uniform Resource Locator (URL) <xref target="RFC2818"/>
that the client can save and subsequently resolve for the user in the
event of a security downgrade. DEEP status has the following formal
syntax:
<figure>
<artwork type="abnf"><![CDATA[
  deep-status  =  ("P" / "N") [";" https-URI]
  
  https-URI    =  <URI from RFC 3986 but scheme MUST be "https">
]]></artwork>
</figure>
The syntax for a Uniform Resource Identifier (URI) is defined in <xref
target="RFC3986"/>. Protocol extensions to advertise DEEP status are
defined in <xref target="deep-status"/>.
</t>
<t>
If the client successfully negotiates TLS and authenticates the server
(e.g., via tls-cert, tls-dane-tlsa or SCRAM-SHA1-PLUS with channel
bindings <xref target="RFC5802"/>), then the client SHOULD record the
server's DEEP status information with the account configuration.
Otherwise, the client SHOULD ignore the server-provided DEEP status. If
the recorded status is provisional ("P"), the client SHOULD NOT latch
any new security tags. This can avoid false positives if the server
operator has to back-out a recent upgrade.
</t>
</section>
<section anchor="latch-fail" title="Email Security Tag Latch Failures">
<t>
When a security tag latch has been set for connections from a client
to a server and the property identified by that tag is no longer
available, this results in a connection failure. An MUA SHOULD inform
the user of a potential threat to their privacy and offer to resolve a
previously-recorded DEEP status https URL if one is available. An MUA
might suggest deleting the account and re-creating it as a cumbersome
mechanism to reset the latches. MUAs are discouraged from offering a
lightweight option to reset or ignore latches as this defeats the
privacy benefit they provide to end users.
</t>
</section>
</section>

<section anchor="tls-received" title="Recording TLS Cipher Suite in Received Header">
<t>
The ESMTPS transmission type <xref target="RFC3848"/> provides trace
information that can indicate TLS was used when transferring mail.
However, TLS usage by itself is not a guarantee of privacy or security.
The TLS cipher suite provides additional information about the level of
privacy or security made available for a connection. This defines a new
SMTP "tls" Received header additional-registered-clause that is used to
record the TLS cipher suite that was negotiated for the connection. The
value included in this additional clause SHOULD be the registered cipher
suite name (e.g., TLS_DHE_RSA_WITH_AES_128_CBC_SHA) included in the TLS
cipher suite registry. In the event the implementation does not know the
name of the cipher suite (a situation that should be remedied promptly),
a four-digit hexadecimal cipher suite identifier MAY be used. The ABNF
for the field follows:
<figure>
<artwork type="abnf">
  tls-cipher-clause  =  CFWS "tls" FWS tls-cipher

  tls-cipher         =  tls-cipher-suite-name / tls-cipher-suite-hex

  tls-cipher-name    =  ALPHA *(ALPHA / DIGIT / "_")
                        ; as registered in IANA cipher suite registry

  tls-cipher-hex     =  "0x" 4HEXDIG
</artwork>
</figure>
</t>
</section>

<section anchor="deep-status" title="Extensions for DEEP Status and Reporting">
<t>
This memo defines optional mechanisms for use by MUAs to communicate
DEEP status to servers.  One purpose of such mechanisms is to permit
servers to determine which and how many clients have latched security
facilities, and thus, to permit operators to be aware of potential
impact to their users should support for such facilities be changed.
For IMAP, the existing ID command is extended to provide this
capability.  For SMTP Submission, a new CLIENT command is defined.
(No similar mechanism is defined for POP in this version of the memo,
but one may be added in the future.)
</t>
<t>
In addition, for each of IMAP, POP, and SMTP, a new DEEP capability is
defined which permits a client to learn whether security features
supported by the server are "normal" (can be expected to be provided
in the future) or merely "provisional", and also to discover a web
page where server status information may be obtained.  The latter
feature is intended to reduce the support burden for operators by
permitting users to better determine the reason for connection
failures.
</t>
<section anchor="imap-ext" title="IMAP DEEP Extension">
<t>
When an IMAP server advertises the DEEP capability, that indicates the IMAP server implements IMAP4 ID <xref target="RFC2971"/> with additional field values defined here. This is grouped with the ID command because that is the existing IMAP mechanism for clients to report data for server logging, and provides a way for the server to report the DEEP status.
<list style="hanging">
<t hangText="deep">From server to client, the argument to this ID field is the server DEEP status. Servers MUST provide this information in response to an ID command.</t>
<t hangText="latch">From client to server, this is a space-separated list of security tags the client has latched for this server. Servers MAY record this information so administrators know the expected privacy level of the client and can thus act to avoid security latch failures (e.g., by renewing server certificates on time, etc).</t>
<t hangText="latch-fail">From client to server, a space-separated list including one or more security tag the client has latched that the client was unable to achieve. This allows clients to report errors to the server prior to terminating the connection to the server in the event an acceptable privacy level is unavailable.</t>
<t hangText="security-tags">From client to server, this is a space-separated list of security tags the client supports that are not latched.</t>
<t hangText="tls">Server-side IMAP proxies that accept TLS connections from clients and connect in-the-clear over a fully private secure network to the server SHOULD use this field to report the tls-cipher (syntax as defined in <xref target="tls-received"/>) to the server.</t>
</list>
IMAP clients SHOULD use the IMAP ID command to report latch failures and determine the server DEEP status. Clients MAY use the ID command to report other latch or security tag information. IMAP servers MUST implement the ID command at least to report DEEP status to clients.
</t>
<figure title="Example 1"><artwork><![CDATA[
  <client connected to port 993 and negotiated TLS successfully>
  S: * OK [CAPABILITY IMAP4rev1 DEEP ID AUTH=PLAIN
          AUTH=SCRAM-SHA-1] hello
  C: a001 ID ("name" "Demo Mail" "version" "1.5" "latch"
          "tls10 tls-cert" "security-tags" "tls12 tls-pfs")
  S: * ID ("name" "Demo Server" "version" "1.7" "deep-status"
           "P;https://www.example.com/privacy-support.html")
  S: a001 OK ID completed
]]></artwork></figure>
<t>This example shows a client that successfully negotiated TLS version
1.0 or later and verified the server's certificate as required by IMAP.
The client supports TLS 1.2 and one or more cipher suite with the
"perfect forward secrecy" property. However, even if the client
successfully negotiated TLS 1.2 or a cipher suite with PFS, it will not
latch those security tags automatically because the server is in
provisional status.</t>
<figure title="Example 2"><artwork><![CDATA[
  <client connected to port 993 and negotiated TLS successfully>
  S: * OK [CAPABILITY IMAP4rev1 DEEP ID AUTH=PLAIN
          AUTH=SCRAM-SHA-1] hello
  C: a001 ID ("name" "Demo Mail" "version" "1.5" "latch-failure"
          "tls-cert")
  S: * ID ("name" "Demo Server" "version" "1.7" "deep-status"
           "N;https://www.example.com/privacy-support.html")
  S: a001 OK ID completed
  C: a002 LOGOUT
]]></artwork></figure>
<t>This example shows a client that negotiated TLS, but was unable to verify the server's certificate. The latch-failure informs the server of this problem, at which point the client can disconnect. If the client had previously latched a URI for privacy problems from this server, it could offer to resolve that URI. However, the deep-status in this exchange is ignored due to the latch failure.</t>
<figure title="Example 3"><artwork><![CDATA[
  <IMAP Proxy has connected over private network on port 143, there is
  a client connected to the proxy on port 993 that has negotiated TLS>
  S: * OK [CAPABILITY IMAP4rev1 DEEP ID AUTH=PLAIN
          AUTH=SCRAM-SHA-1] hello
  C: a001 ID ("name" "Demo Mail" "version" "1.5" "latch"
          "tls10 tls-cert" "security-tags" "tls12 tls-pfs"
          "tls" "TLS_RSA_WITH_AES_128_CBC_SHA")
  S: * ID ("name" "Demo Server" "version" "1.7" "deep-status"
           "N;https://www.example.com/privacy-support.html")
  S: a001 OK ID completed
]]></artwork></figure>
<t>This example shows the connection from an IMAP proxy to a back-end
server. The client connected to the proxy and sent the ID command
shown in example 1, and the proxy has added the "tls" item to the ID
command so the back-end server can log the cipher suite that was used
on the connection from the client.</t>
</section>
<section anchor="pop-ext" title="POP DEEP Extension">
<t>
POP servers supporting this specification MUST implement the POP3
extension mechanism <xref target="RFC2449"/>. POP servers MUST
advertise the DEEP capability with an argument indicating the server's
DEEP status.
</t>
<figure title="Example"><artwork><![CDATA[
  <client connected to port 995 and negotiated TLS successfully>
  S: +OK POP server ready
  C: CAPA
  S: +OK Capability list follows
  S: TOP
  S: SASL PLAIN SCRAM-SHA-1
  S: RESP-CODES
  S: PIPELINING
  S: UIDL
  S: DEEP N;https://www.example.com/privacy-support.html
  S: .
]]></artwork></figure>
<t>After issuing CAPA, the client can see the server is in normal
operation mode, and latch any appropriate security tags as well as the
DEEP status. If the client connects to this same server later and has
a privacy failure, the client can direct the user's browser to the
previously-latched URI where the service provider may provide advice
to the end user.</t>
</section>
<section anchor="smtp-ext" title="SMTP DEEP Extension">
<t>
SMTP Submission servers supporting this specification MUST implement
the DEEP SMTP extension. The name of this extension is DEEP. The EHLO
keyword value is DEEP and the deep-status ABNF is the syntax of the
mandatory parameter to that EHLO keyword. This does not add parameters
to the MAIL FROM or RCPT TO commands. This also adds a CLIENT command
to SMTP which is used to report client information to the server. The
formal syntax for the command follows:
</t>
<figure><artwork type="abnf"><![CDATA[
  deep-cmd             = "CLIENT" 1*(SP deep-parameter)
  
  deep-parameter       = name / version / latch / latch-fail
                         / security-tags / tls / future-extension

  name                 = "name=" esmtp-value
  
  version              = "version=" esmtp-value
  
  latch                = "latch=" security-tag *("," security-tag)

  latch-fail           = "latch-fail=" security-tag
                         *("," security-tag)

  security-tags        = "security-tags=" security-tag
                         *("," security-tag)
  
  tls                  = "tls=" tls-cipher
  
  future-extension     = esmtp-param
  
  esmtp-param          = <as defined in RFC 5321>
  
  esmtp-value          = <as defined in RFC 5321>
]]></artwork></figure>
<t>
The CLIENT command parameters listed here have the same meaning as the parameters used in the IMAP DEEP extension (<xref target="imap-ext"/>). The server responds to the CLIENT command with a "250" if the command has correct syntax and a "501" if the command has incorrect syntax.
<figure title="Example"><artwork><![CDATA[
  <client connected to port 465 and negotiated TLS successfully>
  S: 220 example.com Demo SMTP Submission Server
  C: EHLO client.example.com
  S: 250-example.com
  S: 250-8BITMIME
  S: 250-PIPELINING
  S: 250-DSN
  S: 250-AUTH PLAIN LOGIN
  S: 250-DEEP N;https://www.example.com/privacy-support.html
  S: 250-BURL imap
  S: 250 SIZE 0
  C: CLIENT name=demo_submit version=1.5 latch=tls10,tls-cert
            security-tags=tls12,tls-pfs
  S: 250 OK
]]></artwork></figure>
</t>
</section>
<section title="SMTP Error Extension">
<t>
Although this document focuses on SMTP Submission, it is possible to use
security latches for SMTP transport as well. When MTA transport fails
due to a security latch, the MTA MUST use the SMTP enhanced status code
X.7.TBD. The SMTP notary response <xref target="RFC3464"/> for a
security latch failure MUST include an additional "SMTP-Security-Latch"
recipient-specific header field that includes a space-delimited list
including one or more security latch that failed. The ABNF for this new
field follows:
<figure>
<artwork type="abnf">
  CFWS                 =  &lt;defined in RFC 5322&gt;

  FWS                  =  &lt;defined in RFC 5322&gt;

  smtp-security-latch  =  "SMTP-Security-Latch:" CFWS 
                          security-tag *(FWS security-tag)
</artwork>
</figure>
</t>

</section>
</section>

<section title="Use of SRV records in Establishing Configuration">
<t>This section updates <xref target="RFC6186"/> by changing the
preference rules and adding a new SRV service label _submissions._tcp to
refer to Message Submission with implicit TLS.</t>
<t>User-configurable MUAs SHOULD support use of <xref target="RFC6186"
/> for account setup. However, when using configuration information
obtained by this method, MUAs SHOULD behave as if the user had
explicitly required TLS, unless the user has explicitly requested to
disable it. This will have the effect of causing the MUA to ignore
advertised configurations which do not support TLS, even when those
advertised configurations have a higher priority than other advertised
configurations. The specific user interface by which a user requests to
disable encryption is an implementation detail, but the user interface
should make it clear to users that disabling encryption exposes their
email to others.</t>
<t>When using <xref target="RFC6186" /> configuration information, Mail
User Agents SHOULD NOT automatically establish new configurations that
do not require TLS for all servers, unless there are no advertised
configurations using TLS. If such a configuration is chosen, prior to
attempting to authenticate to the server or use the server for message
submission, the MUA SHOULD warn the user that traffic to that server
will not be encrypted and that it will therefore likely be intercepted
by unauthorized parties. The specific wording is to be determined by the
implementation, but it should adequately capture the sense of risk given
the widespread incidence of mass surveillance of email traffic.
</t>
<t>When establishing a new configuration for connecting to an IMAP,
POP, or SMTP Submission server, an MUA MUST NOT blindly trust SRV
records unless they are signed by DNSSEC and have a valid
signature. Instead, the MUA SHOULD warn the user that the
DNS-advertised mechanism for connecting to the server is not
authenticated, and request the user to manually verify the connection
details by reference to his or her mail service provider's
documentation.</t>
<t>Similarly, an MUA MUST NOT consult SRV records to determine which
servers to use on every connection attempt, unless those SRV records are
signed by DNSSEC and have a valid signature. However, an MUA MAY
consult SRV records from time to time to determine if an MSP's server
configuration has changed, and alert the user if it appears that this
has happened. This can also serve as a means to encourage users to
upgrade their configurations to require TLS if and when their MSPs
support it.</t>
</section>

<section title="Implementation Requirements">
<t>This section details requirements for implementations of electronic
mail protocol clients and servers. A requirement for a client or server
implementation to support a particular feature is not the same thing as
a requirement that a client or server running a conforming
implementation be configured to use that feature. Requirements for Mail
Service Providers (MSPs) are distinct from requirements for protocol
implementations, and are listed in a separate section.</t>

<section title="All Implementations (Client and Server)">
<t>These requirements apply to MUAs as well as POP, IMAP and SMTP
Submission servers.
<list style="symbols">
<t>All implementations MUST be configurable to support implicit TLS
using the TLS 1.2 protocol or later <xref target="RFC5246"/> including
support for the mandatory-to-implement TLS 1.2 cipher suite
TLS_RSA_WITH_AES_128_CBC_SHA.</t>
<t>IMAP implementations MUST support the IMAP4rev1 mandatory-to-implement
cipher suite TLS_RSA_WITH_RC4_128_MD5 for any connections made or
received via IMAP although this MAY be disabled by default.</t>
<t>All implementations MUST be configurable to require TLS before
performing any operation other than capability discovery and STARTTLS.</t>
</list>
</t>
<section anchor="clientcert" title="Client Certificate Authentication">
<t>
MUAs and mail servers MAY implement client certificate authentication
on the implicit TLS port. Servers MUST NOT request a client
certificate during the TLS handshake unless the server is configured
to accept some client certificates as sufficient for authentication
and the server has the ability to determine a mail server
authorization identity matching such certificates. How to make this
determination is presently implementation specific. Clients MUST NOT
provide a client certificate during the TLS handshake unless if the
server requests one and the client has determined the certificate can
be safely used with that specific server, OR the client has been
explicitly configured by the user to use that particular certificate
with that server.  How to make this determination is presently
implementation specific. If the server accepts the client's
certificate as sufficient for authorization, it MUST enable the SASL
EXTERNAL <xref target="RFC4422"/> mechanism. An IMAPS server MAY issue
a PREAUTH greeting instead of enabling SASL EXTERNAL. A client
supporting client certificate authentication with implicit TLS MUST
implement the SASL EXTERNAL <xref target="RFC4422"/> mechanism using
the appropriate authentication command (AUTH for POP3 <xref
target="RFC5034"/>, AUTH for SMTP Submission <xref target="RFC4954"/>,
AUTHENTICATE for IMAP <xref target="RFC3501"/>).
</t>
</section>
</section>

<section title="Mail Server Implementation Requirements">
<t>These requirements apply to servers that implement POP, IMAP or
SMTP Submission.
<list style="symbols">
<t>Servers SHOULD implement and be configurable to support
STARTTLS. This enables discovery of new TLS availability, and can
increase usage of TLS by legacy clients.</t>
<t>Servers MUST NOT advertise STARTTLS if it is unlikely to succeed
based on server configuration (e.g., there is no server certificate
installed).</t>
<t>SMTP message submission servers that have negotiated TLS SHOULD add
a Received header field to the message including the tls clause
described in <xref target="tls-received"/>.</t>
<t>Servers MUST be configurable to include the TLS cipher information
in any connection or user logging or auditing facility they
provide.</t>
</list>
</t>
</section>

<section title="Mail User Agent Implementation Requirements">
<t>This section describes requirements on Mail User Agents (MUAs) using
IMAP, POP, and/or Submission protocols. Note: Requirements pertaining to
use of Submission servers are also applicable to use of SMTP servers
(e.g., port 25) for mail submission.
<list style="symbols">
<t>By default (unless explicitly configured to do otherwise), MUAs
MUST abort a TLS session if the TLS negotiation fails or the server's
certificate is found to be invalid for any reason.  If the MUA is
configured to require TLS for that connection (either explicitly by
the user, or by having had the TLS facility "latched" for that
server), the MUA MUST NOT continue that session.
</t>
<t>However, MUAs MUST be explicitly configurable, on a per-server
basis, to negotiate and use a strong TLS encryption layer in certain
cases when the server certificate is invalid.  In particular, the
client MUST be able to use TLS session encryption even if the server
certificate is expired, self-signed or both.  In the case of an
expired certificate the MUA SHOULD NOT permit the connection unless
the MUA has been explicitly configured ("pinned") to accept that
particular certificate, or if the MUA has previously established a
connection to that server using that certificate prior to the
certificate's expiration.  In the latter case the MUA SHOULD warn the
user that the certificate has expired but still permit the connection
if the user consents.  In the case of a self-signed certificate, the
MUA SHOULD NOT permit the connection unless the MUA has been
explicitly configured ("pinned"), at account configuration time, to
accept that particular certificate.  An MUA MAY permit a certificate
signed by an unknown or untrustworthy CA to be "pinned" in a manner
similar to a self-signed certificate.  Even if explicitly configured
to permit certain kinds of invalid certificate, this configuration
MUST set the tls-cert latch if the server certificate is upgraded to
verify successfully and the server advertises DEEP with normal mode.
(Note in draft: The above probably needs rewording to fully consider
the effect of TLSA records for MUAs that support them.)</t>
<t>MUAs SHOULD be configurable to detect when STARTTLS and/or implicit
TLS becomes available for a protocol and set the tls10 latch if the
server advertises DEEP with normal mode.</t>
<t>Whenever requested to establish any configuration that does not
require both TLS and server certificate verification to talk to a
server or account, an MUA SHOULD warn its user that his or her mail
traffic (including password, if applicable) will be exposed to
attackers, and give the user an opportunity to abort the connection
prior to transmission of any such password or traffic.</t>
<t>Clients MAY (SHOULD?) support TLSA <xref target="RFC6698"/>. If a
client supports both TLSA and DEEP, it MUST save the "tls-dane-tlsa"
security latch if TLSA is successfully negotiated.</t>
<t>MUAs SHOULD implement the "tls12" security latch (the TLS library has
to provide an API that controls permissible TLS versions and
communicates the negotiated TLS protocol version to the application for
this to be possible).</t>
</list>
</t>
</section>

<section title="Non-configurable MUAs and nonstandard access protocols">
<t>MUAs which are not configurable to use user-specified servers MUST
implement TLS or similarly other strong encryption mechanism when
communicating with their mail servers.  This generally applies to MUAs
that are pre-configured to operate with one or more specific services,
whether or not supplied by the vendor of those services.</t>
<t>MUAs using protocols other than IMAP, POP, and Submission to
communicate with mail servers, MUST implement TLS or other similarly
robust encryption mechanism in conjuction with those protocols.</t>
</section>

<section title="DEEP Compliance for Anti-Virus/Anti-Spam Software and Services">
<t>There are multiple ways to connect an Anti-Virus and/or Anti-Spam
(AVAS) service to a mail server. Some mechanisms, such as the de-facto
milter protocol do not impact DEEP. However, some services use an SMTP
relay proxy that intercepts mail at the application layer to perform a
scan and proxy to the real MTA. Deploying AVAS services in this way
can cause many problems <xref target="RFC2979"/> including direct
interference with DEEP. An AVAS product or service is considered DEEP
compliant if all IMAP, POP and SMTP-related software it includes is
DEEP compliant.</t>
</section>
</section>


<section title="Mail Service Provider Requirements">
  <t>This section details requirements for providers of IMAP, POP, and/or
  SMTP submission services, for providers who claim to conform to this
  specification.</t>
  <section title="Server Requirements">
    <t>Mail Service Providers MUST use server implementations that
    conform to this specification.</t>
  </section>
  <section title="MSPs MUST provide Submission Servers">
    <t>Mail Service Providers which accept incoming mail for delivery
    using the Internet Protocol MUST provide one or more SMTP
    Submission servers for this purpose, separate from the SMTP
    servers used to process incoming mail.  Those submission servers
    MUST be configured to support Implicit TLS and MAY be configured
    to support STARTTLS also.</t>

    <t>MSPs MAY also support submission of messages via one or
    more designated SMTP servers to facilitate compatibility with
    existing MUA configurations and legacy MUAs.</t>

    <t>Discussion: SMTP servers used to accept incoming mail or to
    relay mail are expected to accept mail in cleartext.  This is
    incompatible with the purpose of this memo which is to encourage
    encryption of traffic between mail servers.  There is no such
    requirement for mail submission servers to accept mail in
    cleartext or without authentication.  For other reasons, use of
    separate SMTP submission servers has been best practice for many
    years.</t>

    <t>SMTP Submission servers SHOULD require authentication as a
    condition of accepting mail.</t>
  </section>
  <section title="TLS Server Certificate Requirements">
    <t>MSPs MUST maintain valid server certificates for all servers.
    Those server certificates SHOULD present DNS-IDs and SRV-IDs
    conforming to <xref target="RFC6125" /> and which will be
    recognized by MUAs meeting the requirements of that specification.
    In addition, those server certificates MAY provide other DNS-IDs,
    SRV-IDs, or CN-IDs needed for compatibility with existing
    MUAs.</t>
    <!--
    <t>A single certificate MAY be used for multiple electronic
    mail protocol servers (including webmail) which all providing
    service for a particular mail domain, but use of the same
    certificate for services other than electronic mail is
    discouraged.</t>
    -->
    <t>If a protocol server provides service for more than one
    mail domain, its server certificates MAY advertise multiple
    domains.  This will generally be necessary unless and until it
    is acceptable to impose the constraint that the server and all
    clients support the Server Name Indication extension to
    TLS.</t>
  </section>
  <section title="Recommended DNS records for mail protocol servers">
    <t>This section discusses not only the DNS records that are
    recommended, but also implications of DNS records for server
    configuration and TLS server certificates.</t>
    <section title="MX records">
      <t>It is recommended that MSPs advertise MX records
      for handling of inbound mail (instead of relying entirely on
      A or AAAA records), and that those MX records be signed
      using DNSSEC.  This is mentioned here only for completeness,
      as handling of inbound mail is out of scope for this
      document.</t>
    </section>
    <section title="SRV records">
      <t>MSPs SHOULD advertise SRV records to aid MUAs in
      determination of proper configuration of servers, per the
      instructions in <xref target="RFC6186" />.</t>
      <t>MSPs SHOULD advertise servers that support Implicit TLS
      in preference to those which support cleartext and/or
      STARTTLS operation.</t>
    </section>
    <section title="TLSA records">
      <t>MSPs SHOULD advertise TLSA records to provide an
      additional trust anchor for public keys used in TLS server
      certificates.  However, TLSA records MUST NOT be advertised
      unless they are signed using DNSSEC.</t>
    </section>
    <section title="DNSSEC">
      <t>All DNS records advertised by an MSP as a means of aiding
      clients in communicating with the MSP's servers, SHOULD be
      signed using DNSSEC.</t>
    </section>
  </section>
  <section title="MSP Server Monitoring">
    <t>MSPs SHOULD regularly and frequently monitor their various
    servers to make sure that: TLS server certificates remain valid
    and are not about to expire, TLSA records match the public keys
    advertised in server certificates, are signed using DNSSEC, server
    configurations are consistent with SRV advertisements, and DNSSEC
    signatures are valid and verifiable.  Failure to detect expired
    certificates and DNS configuration errors in a timely fashion can
    result in significant loss of service for an MSP's users and a
    significant support burden for the MSP.</t>
  </section>
  <section title="Advertisement of provisional vs. normal mode">
    <t>MSPs SHOULD advertise their security configuration as "normal"
    using the protocol mechanisms defined above, if and when the
    configurations are stable, so that clients may upgrade ("latch")
    themselves to support the improved security facilities as they
    become available.  MSPs MUST advertise their security
    configurations as "provisional" during periods when new security
    facilities are being tested, so as to prevent clients from
    latching newly discovered security facilities during these
    periods.</t>
  </section>
  <!--
  <section title="Encourage Transition to TLS Required Configurations">
    <t>Mail Service Providers SHOULD encourage their users to
    transition to requiring TLS for communications with their
    servers.</t>

    <t>Each MSP must determine which transition measures are most
    appropriate for its own user community.  Possible mechanisms
    include, but are not limited to: using <xref target="RFC6186"
    /> to advertise servers which implement Implicit TLS; allowing
    individual users to configure their accounts so that the
    servers will refuse their authentication unless using TLS;
    requiring new users to always use TLS; providing or
    recommending MUA implementations that implement TLS and the
    ability to require TLS.</t>

    <t>Note: there is a tradeoff here between encouraging use of
    TLS and not breaking access for existing users or users with
    legacy mail clients.  Whether to enable "TLS required" for all
    users, new users only, or particular users that have expressed
    a preference to always use TLS, is a policy decision which
    should be re-evaluated periodically as conditions change -
    e.g. as more clients are upgraded to support TLS and <xref
    target="RFC6186" />.  Similarly, whether and when to require
    existing users to use TLS (and perhaps to upgrade their mail
    clients) is a policy decision that will differ from one
    service provider to the next depending on conditions and
    business needs.</t>
  </section>
  -->
</section>

<section anchor="iana" title="IANA Considerations">
<t>
TBD:
<list style="symbols">
<t>Create expert review, publication required registry for security latches. Initialize registry with latches from <xref target="sec-tag-initial"/>.</t>
</list>
</t>
<section anchor="iana-pop3s" title="POP3S Port Registration Update">
<t>
IANA is asked to update the registration of the TCP well-known port 995 using the following template (<xref target="RFC6335"/>):
<figure>
<artwork>
  Service Name: pop3s
  Transport Protocol: TCP
  Assignee: IETF &lt;iesg@ietf.org>
  Contact: IESG &lt;iesg@ietf.org>
  Description: POP3 over TLS protocol
  Reference: RFC XXXX (this document once published) <!-- &rfc.number; -->
  Port Number: 995
</artwork></figure>
</t>
</section>
<section anchor="iana-imaps" title="IMAPS Port Registration Update">
<t>
IANA is asked to update the registration of the TCP well-known port 993 using the following template (<xref target="RFC6335"/>):
<figure>
<artwork>
  Service Name: imaps
  Transport Protocol: TCP
  Assignee: IETF &lt;iesg@ietf.org>
  Contact: IESG &lt;iesg@ietf.org>
  Description: IMAP over TLS protocol
  Reference: RFC XXXX (this document once published) <!-- &rfc.number; -->
  Port Number: 993
</artwork></figure>
</t>
</section>
<section anchor="iana-submissions" title="Submissions Port Registration">
<t>
IANA is asked to assign an alternate usage of port 465 in addition to the current assignment using the following template (<xref target="RFC6335"/>):
<figure>
<artwork>
  Service Name: submissions
  Transport Protocol: TCP
  Assignee: IETF &lt;iesg@ietf.org>
  Contact: IESG &lt;iesg@ietf.org>
  Description: Message Submission over TLS protocol
  Reference: RFC XXXX (this document once published) <!-- &rfc.number; -->
  Port Number: 465
</artwork></figure>
This is a one time procedural exception to the rules in RFC 6335. This
requires explicit IESG approval and does not set a precedent.
Historically, port 465 was briefly registered as the "smtps" port. This
registration made no sense as the SMTP transport MX infrastructure has
no way to specify a port so port 25 is always used. As a result, the
registration was revoked and was subsequently reassigned to a different
service. In hindsight, the "smtps" registration should have been renamed
or reserved rather than revoked. Unfortunately, some widely deployed
mail software interpreted "smtps" as "submissions" <xref
target="RFC6409"/> and used that port for email submission by default
when an end-user requests security during account setup. If a new port
is assigned for the submissions service, email software will either
continue with unregistered use of port 465 (leaving the port registry
inaccurate relative to de-facto practice and wasting a well-known port),
or confusion between the de-facto and registered ports will cause
harmful interoperability problems that will deter use of TLS for message
submission. The authors believe both of these outcomes are less
desirable than a wart in the registry documenting real-world usage of
a port for two purposes. Although STARTTLS-on-port-587 has deployed, it
has not replaced deployed use of implicit TLS submission on port 465.
</t>
</section>
<section title="DEEP IMAP Capability">
<t>This document adds the DEEP capability to the IMAP capabilities registry. This is described in section <xref target="imap-ext"/>.</t>
</section>
<section title="DEEP POP3 Capability">
<t>This document adds the DEEP capability to the POP3 capabilities registry.
<list style="hanging">
<t hangText="CAPA Tag:">DEEP</t>
<t hangText="Arguments:">deep-status</t>
<t hangText="Added Commands:">none</t>
<t hangText="Standard Commands affected:">none</t>
<t hangText="Announced status / possible differences:">both / may change after STLS</t>
<t hangText="Commands Valid in States:">N/A</t>
<t hangText="Specification Reference:">This document</t>
<t hangText="Discussion:">See <xref target="pop-ext"/>.</t>
</list>
</t>
</section>
<section title="DEEP SMTP EHLO Keyword">
<t>This document adds the DEEP EHLO Keyword to the SMTP Service Extension registry. This is described in section <xref target="smtp-ext"/>.</t>
</section>
<section title="SMTP Enhanced Status Code">
<t>This document adds the following entry to the "SMTP Enhanced Status Codes" registry created by <xref target="RFC5248"/>.
<list style="hanging">
<t hangText="Code:">X.7.TBD (IANA, please assign the next available number)</t>
<t hangText="Sample Text:">Message Transport Failed due to missing required security.</t>
<t hangText="Associated Basic Status Code:">450, 454, 550, 554</t>
<t hangText="Description">This code indicates an SMTP server was unable
to forward a message to the next host necessary for delivery because it
required a higher level of transport security or privacy than was
available. The temporary form of this error is preferred in case the
problem is caused by a temporary administrative error such as an expired
server certificate.</t>
<t hangText="Reference">This document</t>
<t hangText="Submitter">C. Newman</t>
<t hangText="Change Controller">IESG</t>
</list>
</t>
</section>
<section title="MAIL Parameters Additional-registered-clauses Sub-Registry">
<t>
This document adds the following entry to the "Additional-registered-clauses" sub-registry of the "MAIL Parameters" registry, created by <xref target="RFC5321"/>:
<list style="hanging">
<t hangText="Clause Name:">tls</t>
<t hangText="Description:">Indicates the TLS cipher suite used for a transport connection.</t>
<t hangText="Syntax Summary:">See tls-cipher ABNF <xref target="tls-received"/></t>
<t hangText="Reference:">This document.</t>
</list>
</t>
</section>
</section>

<section title="Security Considerations">
<t>
This entire document is about security considerations. In general, this
is targeted to improve mail privacy and to mitigate threats external to
the email system such as network-level snooping or interception; this is
not intended to mitigate active attackers who have compromised service
provider systems.
</t>
<t>
It could be argued that sharing the name and version of the client
software with the server has privacy implications. Although providing
this information is not required, it is encouraged so that mail service
providers can more effectively inform end-users running old clients that
they need to upgrade to protect their privacy, or know which clients to
use in a test deployment prior to upgrading a server to have higher
security requirements.
</t>
</section>

</middle>
<back>
<references title="Normative References">
<?rfc include="reference.RFC.1939"?> <!-- POP3 -->
<?rfc include="reference.RFC.2119"?> <!-- Key words -->
<?rfc include="reference.RFC.2449"?> <!-- POP3 CAPA -->
<?rfc include="reference.RFC.2818"?> <!-- https -->
<?rfc include="reference.RFC.2971"?> <!-- IMAP ID -->
<?rfc include="reference.RFC.3207"?> <!-- SMTP STARTTLS -->
<?rfc include="reference.RFC.3501"?> <!-- IMAP -->
<?rfc include="reference.RFC.3464"?> <!-- DSN format -->
<?rfc include="reference.RFC.3986"?> <!-- URI syntax -->
<?rfc include="reference.RFC.5034"?> <!-- POP3 AUTH -->
<?rfc include="reference.RFC.5234"?> <!-- ABNF -->
<?rfc include="reference.RFC.5246"?> <!-- TLS 1.2 -->
<?rfc include="reference.RFC.5248"?> <!-- SMTP Enhanced Status Codes -->
<?rfc include="reference.RFC.5321"?> <!-- SMTP -->
<?rfc include="reference.RFC.5322"?> <!-- Message Format -->
<?rfc include="reference.RFC.6125"?>
<?rfc include="reference.RFC.6186"?> <!-- SRV for email -->
<?rfc include="reference.RFC.6409"?> <!-- Message Submission -->
<?rfc include="reference.I-D.draft-melnikov-email-tls-certs-01"?>
<?rfc include="reference.I-D.draft-ietf-dane-smtp-with-dane-02"?>
</references>
<references title="Informative References">
<?rfc include="reference.RFC.2246"?> <!-- TLS 1.0 -->
<?rfc include="reference.RFC.2595"?> <!-- STARTTLS for IMAP and POP -->
<?rfc include="reference.RFC.2979"?> <!-- Firewall Requirements -->
<?rfc include="reference.RFC.3848"?> <!-- ESMTP and LMTP transmission types -->
<?rfc include="reference.RFC.4422"?> <!-- SASL EXTERNAL -->
<?rfc include="reference.RFC.4954"?> <!-- SMTP AUTH -->
<?rfc include="reference.RFC.5598"?> <!-- Mail architecture -->
<?rfc include="reference.RFC.5802"?> <!-- SCRAM -->
<?rfc include="reference.RFC.6335"?> <!-- TCP Port Registration -->
<?rfc include="reference.RFC.6698"?> <!-- DANE TLSA -->
</references>
<section anchor="design" title="Design Considerations">
<t>
This section is not normative.
</t>
<t>
The first version of this was written independently from
draft-moore-email-tls-00.txt. The authors believe it desirable to
merge these two proposals.  This current draft is a first attempt to
do that, though that task may not be fully completed.   
</t>
<t>
One author of this document was also the author of RFC 2595 that
became the standard for TLS usage with POP and IMAP, and the other
author was perhaps the first to propose that idea. In hindsight both
authors now believe that that approach was a mistake. At this point
the authors believe that while anything that makes it easier to deploy
TLS is good, the desirable end state is that these protocols always
use TLS, leaving no need for a separate port for cleartext operation
except to support legacy clients while they continue to be used. The
separate port model for TLS is inherently simpler to implement, debug
and deploy. It also enables a "generic TLS load-balancer" that accepts
secure client connections for arbitrary foo-over-TLS protocols and
forwards them to a server that may or may not support TLS. Such
load-balancers cause many problems because they violate the end-to-end
principle and the server loses the ability to log security-relevant
information about the client unless the protocol is designed to
forward that information (as this specification does for the cipher
suite). However, they can result in TLS deployment where it would not
otherwise happen which is a sufficiently important goal that it
overrides the problems.
</t>
<t>
Although STARTTLS appears only slightly more complex than separate-port
TLS, we again learned the lesson that complexity is the enemy of
security in the form of the STARTTLS command injection vulnerability
(CERT vulnerability ID #555316). Although there's nothing inherently wrong with STARTTLS, the fact it resulted in a common implementation error (made independently by multiple implementers) suggests it is a less secure architecture than Implicit TLS.
</t>
<t>
Section 7 of RFC 2595 critiques the separate-port approach to TLS. The
first bullet was a correct critique. There are proposals in the http
community to address that, and use of SRV records as described in RFC
6186 resolves that critique for email. The second bullet is correct as
well, but not very important because useful deployment of security
layers other than TLS in email is small enough to be effectively
irrelevant. The third bullet is incorrect. There are three desirable
security policies but they are "require TLS", "don't use TLS" and "use
and latch-on TLS if available". The intermediate "use TLS if
available" may be a better policy than "don't use TLS", but in
hindsight it's not enough better to justify extra design complexity,
and the ease with which opportunistic TLS can be downgraded by an
active attack may mean that this mode provides a false sense of
security. The fourth bullet may be correct, but is not a problem yet
with current port consumption rates. The fundamental error was
prioritizing a perceived better design based on a mostly valid
critique over real-world deployability. But getting security and
privacy facilities actually deployed is so important it should trump
design purity considerations.
</t>
</section>
<section title="Open Issues">
<t>
There are many open issues with this document. Here is an attempt to enumerate some of them:
<list style="symbols">
<t>
A suggestion has been made to add a DNSSEC latch. We like the idea,
but may need help writing the text and references correctly.
</t>
<t>
The authors are presently concerned about certificate expiration
causing support calls that would deter deployment of this proposal due
to the tls-cert security latch. Some of the requirements in
draft-moore-email-tls-00.txt related to certificate management may
help with this. A requirement for server software to generate an
alarm, admin email and/or log message as certificate expiration
approaches may also be helpful there.
</t>
<t>
Discussion of pinning certificates may be inadquate. One author (CN)
considers pinning certificates with an expiration date to be a serious
deployment problem due to support calls generated when the
certificates expire and difficulty of upgrading pinned certificates
with a reasonable user interface at the MUA.  More discussion of this
issue is needed.
</t>
<t>
One author is concerned by the required support for DNS-ID and SRV-ID
in draft-melnikov-email-tls-certs-01; and feels it may be premature to
require that (particularly SRV-ID) if we want something deployable.
</t>
<t>
One author believes that the security latch in this is complementary
with draft-ietf-dane-smtp-with-dane-02 but hasn't thought about the
issues in depth. We welcome feedback on this point.
</t>
<t>
The authors are not sure if this document should cover cipher suite
requirements beyond those already published or if they should leave
that to a subsequent document.
</t>
<t>
It might make sense to split this in two documents if it's getting too
long.  In particular, it might make sense to put implementation
requirements and service provider requirements in separate documents.
</t>
<t>
The use of SRV records <xref target="RFC6186"/> for account setup or
refresh is presently not secure from DNS active attacks unless DNSSEC
is used. As this document is now focusing on MUA security/privacy,
discussing how to do SRV record account setup or account refresh
securely, probably using DANE, would be in scope for this document. It
has been suggested that we add this.
</t>
<t>
The current version of the document provides a single "normal"
vs. "provisional" indication as to whether the security features
negotiated by a client and server may be latched by the client.  One
author is concerned that this may be inadequate.  For example it may
make it difficult to test new security features later on a provisional
basis, without inhibiting clients' ability to latch features that are
already well-tested and stable.
</t>
</list>
</t>
</section>
<section title="DEEP Status Implementation Suggestion">
<t>This section is not normative.</t>
<t>One way that server software could handle the provisional vs. normal modes for DEEP status is to record a timestamp whenever a TLS-security impacting change is made to the server (e.g., a software upgrade or setting configuration for cipher suites). The server could automatically put itself in provisional mode for a period of time, such as one month, and then revert to normal mode. This automatically creates a window where the administrator can safely back-out problematic changes without requiring the administrator to be security savvy. Having a way to adjust the time window or explicitly lock the server in provisional or normal mode would also be helpful.</t>
</section>
<section title="Change Log">
<t>Changes since -00:
<list style="symbols">
<t>Rewrote introduction to merge ideas from draft-moore-email-tls-00.</t>
<t>Added Implicit TLS section, Account configuration section and IANA port registration updates based on draft-moore-email-tls-00.</t>
<t>Add protocol details necessary to standardize implicit TLS for POP/IMAP/submission, using ideas from draft-melnikov-pop3-over-tls.</t>
<t>Reduce initial set of security tags based on feedback.</t>
<t>Add deep status concept to allow a window for software updates to be backed out before latches make that problematic, as well as to provide service providers with a mechanism they can use to assist customers in the event of a privacy failure.</t>
<t>Add DNS SRV section from draft-moore-email-tls-00.</t>
<t>Write most of the missing IANA considerations section.</t>
<t>Rewrite most of implementation requirements section based more on
draft-moore-email-tls-00. Remove new cipher requirements for now
because those may be dealt with elsewhere.</t>
</list>
</t>
</section>
<section title="Acknowledgements">
<t>Many thanks to Ned Freed for discussion of the initial latch concepts in this document. Thanks to Alexey Melnikov for draft-melnikov-pop3-over-tls-02, which was the basis of the POP3 implicit TLS text. Thanks to Dan Newman and Alexey Melnikov for review feedback. Thanks to Paul Hoffman for interesting feedback in initial conversations about this idea.</t>
</section>
</back>
</rfc>
