This preview shows page 1. Sign up to view the full content.
Unformatted text preview: , because electronic mail is sometimes used
to send files. Figure 28.1 shows an outline of e-mail exchange using TCP/IP. Figure 28.1 Outline of Internet electronic mail.
Users deal with a user agent, of which there are a multitude to choose from. Popular user
agents for Unix include MH, Berkeley Mail, Elm, and Mush.
The exchange of mail using TCP is performed by a message transfer agent (MTA). The
most common MTA for Unix systems is Sendmail. Users normally don't deal with the
MTA. It is the responsibility of the system administrator to set up the local MTA. Users
often have a choice, however, for their user agent.
This chapter examines the exchange of electronic mail between the two MTAs using TCP.
We do not look at the operation or design of user agents.
RFC 821 [Postel 1982] specifies the SMTP protocol. This is how two MTAs
communicate with each other across a single TCP connection. RFC 822 [Crocker 1982]
specifies the format of the electronic mail message that is transmitted using RFC 821
between the two MTAs. file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/smtp_sim.htm (1 of 23) [12/09/2001 14.47.52] Chapter 28. SMTP: Simple Mail Transfer Protocol 28.2 SMTP Protocol
The communication between the two MTAs uses NVT ASCII. Commands are sent by the
client to the server, and the server responds with numeric reply codes and optional humanreadable strings. This is similar to what we saw with FTP in the previous chapter.
There are a small number of commands that the client can send to the server: less than a
dozen. (By comparison, FTP has more than 40 commands.) Rather than describing each
one, we'll start with a simple example to show what happens when we send mail.
We'll send a simple one-line message and watch the SMTP connection. We invoke our
user agent with the -v flag, which is passed to the mail transport agent (Sendmail in this
case). This MTA displays what is sent and received across the SMTP connection...
View Full Document
- Spring '12