| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SMTP Connection and Session Establishment and Termination (Page 3 of 4) Connection Establishment Using SMTP Extensions The SMTP extensions defined at first in RFC 1425 and then in subsequent standards up to RFC 2821 define an alternative hello message for the client to use: EHLO (extended hello). An SMTP sender supporting SMTP extensions (and most do) uses EHLO instead of HELO in response to the 220 greeting. This serves both to say hello to the SMTP receiver, and to tell it that the sender supports SMTP extensions. If the SMTP receiver supports the extensions, it replies back with the usual 250 reply, as well as a series of extra 250 responses. Each of these lists an EHLO keyword that indicates a particular SMTP extension the receiver supports. If the receiving server doesn't support the extensions, it will reject the EHLO command with a 500 reply code (syntax error, command not recognized). This tells the SMTP sender that it cannot use extensions; it will then either issue a conventional HELO command, or QUIT the connection if it requires the SMTP extensions to be present. (In practice, it is rare for a server to require the use of SMTP extensions.) Here's the same example as above, but using EHLO. The sender says: EHLO smtp.sendersite.org Assuming mail.receiversplace.com supports the SMTP extensions, a typical reply might be: 250-mail.receiversplace.com Hello smtp.sendersite.org, nice to meet you. Each of these additional replies identifies a particular SMTP extension supported by mail.receiversplace.com; in this case, message size declaration (SIZE), delivery status notification (DSN) and command pipelining. (The dashes after the 250 indicate a multiple-line response to a command.) Once the HELO or EHLO command has been sent and the receiving device has responded, the session is initiated. Further commands can be sent by the sending SMTP server to the responding server. These usually take the form of e-mail message transfer transactions using the process described in the following topic, and other command/reply exchanges as needed.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |