ESMTP Sessions

Whether or not a mail server supports SMTP service extensions, mail can generally be delivered. It is only a matter of the client determining how much work it needs to do to prepare a message for transit. This section includes two sample sessions that illustrate this principle: the first one shows an ESMTP session that uses the DSN service extension to request a return receipt of a message. The second one shows the same message being delivered without use of any service extensions.

Figure 9-2 shows an ESMTP session that uses the DSN service extension to request a return receipt of a message. The client should note upon initial connection that the server states in its banner that it supports some service extensions: it includes the string “ESMTP” in the banner. The list of service extensions is returned in the response to the client’s EHLO command.

The client follows with the use of the standard (but optional) EXPN command. This is not necessary but simply illustrates the appropriate place in the flow of a session for this type of command. The server responds with the full (expanded) addresses of all members of the “geeks” mailing list.

A HELP command is issued next with a parameter of SOML. This asks for help with the outdated SOML command. The server returns help on the command but notes that it is not implemented.

A mail transaction state is entered with use of the MAIL command. In this case, the client is using the proposed DSN service extension in the MAIL command ...

Get Programming Internet Email now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.