rfc3207.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 508 行 · 第 1/2 页
TXT
508 行
C: <opens connection>
S: 220 mail.imc.org SMTP service ready
C: EHLO mail.example.com
S: 250-mail.imc.org offers a warm hug of welcome
S: 250-8BITMIME
S: 250-STARTTLS
S: 250 DSN
C: STARTTLS
S: 220 Go ahead
C: <starts TLS negotiation>
C & S: <negotiate a TLS session>
C & S: <check result of negotiation>
C: EHLO mail.example.com
S: 250-mail.imc.org touches your hand gently for a moment
S: 250-8BITMIME
S: 250 DSN
6. Security Considerations
It 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
Hoffman Standards Track [Page 5]
RFC 3207 SMTP Service Extension - Secure SMTP over TLS February 2002
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.
Both the SMTP client and server must check the result of the TLS
negotiation to see whether an acceptable degree of authentication and
privacy was achieved. Ignoring this step completely invalidates
using TLS for security. The decision about whether acceptable
authentication or privacy was achieved is made locally, is
implementation-dependent, and is beyond the scope of this document.
The SMTP client and server should note carefully the result of the
TLS negotiation. If the negotiation results in no privacy, or if it
results in privacy using algorithms or key lengths that are deemed
not strong enough, or if the authentication is not good enough for
either party, the client may choose to end the SMTP session with an
immediate QUIT command, or the server may choose to not accept any
more SMTP commands.
A man-in-the-middle attack can be launched by deleting the "250
STARTTLS" response from the server. This would cause the client not
to try to start a TLS session. Another man-in-the-middle attack is
to allow the server to announce its STARTTLS capability, but to alter
the client's request to start TLS and the server's response. In
order to defend against such attacks both clients and servers MUST be
able to be configured to require successful TLS negotiation of an
appropriate cipher suite for selected hosts before messages can be
successfully transferred. The additional option of using TLS when
possible SHOULD also be provided. An implementation MAY provide the
ability to record that TLS was used in communicating with a given
peer and generating a warning if it is not used in a later session.
If the TLS negotiation fails or if the client receives a 454
response, the client has to decide what to do next. There are three
main choices: go ahead with the rest of the SMTP session, retry TLS
at a later time, or give up and return the mail to the sender. If a
failure or error occurs, the client can assume that the server may be
able to negotiate TLS in the future, and should try negotiate TLS in
a later session, until some locally-chosen timeout occurs, at which
point, the client should return the mail to the sender. However, if
the client and server were only using TLS for authentication, the
client may want to proceed with the SMTP session, in case some of the
operations the client wanted to perform are accepted by the server
even if the client is unauthenticated.
Before the TLS handshake has begun, any protocol interactions are
performed in the clear and may be modified by an active attacker.
Hoffman Standards Track [Page 6]
RFC 3207 SMTP Service Extension - Secure SMTP over TLS February 2002
For this reason, clients and servers MUST discard any knowledge
obtained prior to the start of the TLS handshake upon completion of
the TLS handshake.
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.
7. References
[RFC2821] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821,
April 2001.
[RFC2034] Freed, N., "SMTP Service Extension for Returning Enhanced
Error Codes", RFC 2034, October 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2476] Gellens, R. and J. Klensin, "Message Submission", RFC
2476, December 1998.
[SASL] Myers, J., "Simple Authentication and Security Layer
(SASL)", RFC 2222, October 1997.
[SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
RFC 2554, March 1999.
[TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
RFC 2246, January 1999.
Hoffman Standards Track [Page 7]
RFC 3207 SMTP Service Extension - Secure SMTP over TLS February 2002
Appendix
This document is a revision of RFC 2487, which is a Proposed
Standard. The changes from that document are:
- Section 5 and 7: More discussion of the man-in-the-middle attacks
- Section 5: Additional discussion of when a server should and
should not advertise the STARTTLS extension
- Section 5: Changed the requirements on SMTP clients after
receiving a 220 response.
- Section 5.1: Clarified description of verifying certificates.
- Section 5.3: Added the section on "STARTTLS on the Submission
Port"
- Section 6: Bug fix in the example to indicate that the client
needs to issue a new EHLO command, as already is described in
section 5.2.
- Section 7: Clarification of the paragraph on acceptable degree of
privacy. Significant change to the discussion of how to avoid a
man-in-the-middle attack.
- Section A: Update reference from RFC 821 to RFC 2821.
Author's Address
Paul Hoffman
Internet Mail Consortium
127 Segre Place
Santa Cruz, CA 95060
Phone: (831) 426-9827
EMail: phoffman@imc.org
Hoffman Standards Track [Page 8]
RFC 3207 SMTP Service Extension - Secure SMTP over TLS February 2002
Full Copyright Statement
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Hoffman Standards Track [Page 9]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?