Network Working Group P. Hoffman
Request for Comments: 2487 Internet Mail Consortium
Category: Standards Track January 1999
SMTP Service Extension for Secure SMTP over TLS
1. Abstract
This document describes an extension to the SMTP service that allows an SMTP server and client to use 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.
2. Introduction
SMTP [RFC-821] servers and clients normally communicate in the clear over the Internet. In many cases, this communication goes through one or more router that is not controlled or trusted by either entity. Such an untrusted router might allow a third party to monitor or alter the communications between the server and client.
Hoffman Standards Track [Page 1]
RFC 2487 SMTP Service Extension January 1999 2.1 TerminologyThe 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 [RFC-2119].
3. STARTTLS Extension
The STARTTLS extension to SMTP is laid out as follows:
4. The STARTTLS Keyword
The STARTTLS keyword is used to tell the SMTP client that the SMTP server allows use of TLS. It takes no parameters.
5. The STARTTLS Command
The format for the STARTTLS command is:
Hoffman Standards Track [Page 2]
RFC 2487 SMTP Service Extension January 1999
A SMTP server that is not publicly referenced may choose to require that the client perform a TLS negotiation before accepting any commands. In this case, the server SHOULD return the reply code:
5.1 Processing After the STARTTLS Command
After the TLS handshake has been completed, both parties MUST immediately decide whether or not to continue based on the authentication and privacy achieved. The SMTP client and server may decide to move ahead even if the TLS negotiation ended with no authentication and/or no privacy because most SMTP services are performed with no authentication and no privacy, but some SMTP clients or servers may want to continue only if a particular level of authentication and/or privacy was achieved.
Hoffman Standards Track [Page 3]
RFC 2487 SMTP Service Extension January 1999
- A SMTP client would probably only want to authenticate an SMTP server whose server certificate has a domain name that is the domain name that the client thought it was connecting to.
5.2 Result of the STARTTLS Command
Upon completion of the TLS handshake, the SMTP protocol is reset to the initial state (the state in SMTP after a server issues a 220 service ready greeting). The server MUST discard any knowledge obtained from the client, such as the argument to the EHLO command, which was not obtained from the TLS negotiation itself. The client MUST discard any knowledge obtained from the server, such as the list of SMTP service extensions, which was not obtained from the TLS negotiation itself. The client SHOULD send an EHLO command as the first command after a successful TLS negotiation.
6. Usage Example
The following dialog illustrates how a client and server can start a TLS session:
Hoffman Standards Track [Page 4]
RFC 2487 SMTP Service Extension January 1999 7. Security ConsiderationsIt should be noted that SMTP is not an end-to-end mechanism. Thus, if an SMTP client/server pair decide to add TLS privacy, they are not securing the transport from the originating mail user agent to the recipient. Further, because delivery of a single piece of mail may go between more than two SMTP servers, adding TLS privacy to one pair of servers does not mean that the entire SMTP chain has been made private. Further, just because an SMTP server can authenticate an SMTP client, it does not mean that the mail from the SMTP client was authenticated by the SMTP client when the client received it.
Hoffman Standards Track [Page 5]
RFC 2487 SMTP Service Extension January 1999
The STARTTLS extension is not suitable for authenticating the author of an email message unless every hop in the delivery chain, including the submission to the first SMTP server, is authenticated. Another proposal [SMTP-AUTH] can be used to authenticate delivery and MIME security multiparts [MIME-SEC] can be used to authenticate the author of an email message. In addition, the [SMTP-AUTH] proposal offers simpler and more flexible options to authenticate an SMTP client and the SASL EXTERNAL mechanism [SASL] MAY be used in conjunction with the STARTTLS command to provide an authorization identity.
Hoffman Standards Track [Page 6]
RFC 2487 SMTP Service Extension January 1999 A. References[RFC-821] Postel, J., "Simple Mail Transfer Protocol", RFC 821,
B. Author's Address
Paul Hoffman Internet Mail Consortium 127 Segre Place Santa Cruz, CA 95060
Hoffman Standards Track [Page 7]
RFC 2487 SMTP Service Extension January 1999 C. Full Copyright StatementCopyright (C) The Internet Society (1999). All Rights Reserved.