-->
Previous Table of Contents Next


Table 26.1 presents, in chronological order, the RFCs relevant to sendmail.

Table 26.1 RFCs Dealing with Electronic Mail Messaging

Number Title Comment

RFC819 Domain Naming Contains convention for Internet user applications.
RFC821 Simple Mail Transfer Protocol Defines SMTP.
RFC822 Standard for the Format of ARPA Internet Text Messages Defines the format (headers, body, and how to separate the two) for Internet text mail messages.
RFC976 UUCP Mail Interchange Format Standard Defines the UNIX-to-UNIX-Copy-Protocol (UUCP) format of mail messages between two UNIX systems.
RFC1123 Requirements for Internet Hosts - Application and Support Extends and updates RFC822, mostly by clarifying ambiguous issues in the original document.
RFC1327 Mapping between X.400 (1988) / ISO 10021 and RFC822 Updates RFC822.
RFC1521 and RFC1522 MIME (Multipurpose Internet Mail Extensions) Parts One and Two Provides another extension to the mail format defined in RFC822 by defining Multipurpose Internet Mail Extensions (MIME), which, among other things, allows insertion of binary files such as graphics and sound to mail messages. These two were made obsolete by RFC2045–2049.
RFC1651 SMTP Service Extensions Introduces ESTMP (Extended Simple Mail Transfer Protocol).
RFC1652 SMTP Service Extension for 8-bit MIME Transport
RFC1653 MTP Service Extension for Message
RFC1869 SMTP Service Extensions Makes RFC1651 obsolete.
RFC1870 SMTP Service Extension for Message Size Declaration Makes RFC1653 obsolete.
RFC1891 SMTP Service Extension for Delivery Status Notifications
RFC1892 The Multipart/Report Content Type for the Reporting of Mail System Administrative Messages
RFC1893 Enhanced Mail System Status Codes
RFC1894 An Extensible Message Format for Delivery Status Notifications
RFC2045–2049 Multipurpose Internet Mail Extensions (MIME) Parts One through Five Make RFC1521 and RFC1522 obsolete.

Internet Protocols

sendmail uses the Simple Mail Transfer Protocol (SMTP) to move messages between two mailservers. Acting as a server-to-server protocol, SMTP requires another protocol such as POP3 to collect and process messages locally and deliver the messages to specific users. SMTP is the communications protocol generally used in UNIX-based networks for mail over TCP/IP (Transmission Control Protocol/Internet Protocol) connections. Unlike the UUCP protocol, which must have a “map” of which machines exist between the sender and the destination, TCP/IP allows one system on a network to talk “directly” to another by passing packets of information back and forth between the two. The SMTP protocol is defined in the IETF’s RFC821 titled “Simple Mail Transfer Protocol.”

SMTP and ESMTP

SMTP is a TCP-based client/server protocol, originally defined in the IETF’s RFC821. SMTP is complex in details but is fundamentally simple. After a reliable connection is established, the mail client (MUA) initiates a brief handshaking sequence with the mail server (MTA). The client then sends one or more messages to the MTA for delivery. Before each message is sent, the mail client sends a list of the message’s local recipients and the sender’s address. In an obvious paper mail parallel, this information is referred to as the message’s envelope.

The handshaking sequence and message content exchange takes place in a formal language made up of four-character commands and three-digit reply codes. For example, an ESMTP mail exchange log might look like this:


$ /usr/sbin/sendmail -v david@mail.fake.com < message

david@mail.fake.com… Connecting to localmail.mail.fake.com. via smtp…

220 localmail.mail.fake.com ESMTP Sendmail 8.9/8.9/; Sat, 22 May 1999

08:06:22 – 0700

>>> EHLO gateway.oppositemail.com

250 localmail.mail.fake.com Hello michael@gateway.oppositemail.com

[192.168.0.5], pleased to meet you

>>> MAIL From:michael@gateway.oppositemail.com

250 <michael@gateway.oppositemail.com>… Sender ok

>>> RCPT To:david@mail.fake.com

250 Recipient ok

>>> DATA

354 Enter mail, end with "." on a line by itself

>>>.

250 WAA11745 Message accepted for delivery

david@mail.fake.com… Sent (WAA11745 Message accepted for delivery)

Closing connection to localmail.mail.fake.com.

>>> QUIT

221 localmail.mail.fake.com closing connection

A framework for additional features in electronic mail is called Extended Simple Mail Transport Protocol (ESMTP). ESMTP is a mechanism by which any extensions used with traditional SMTP can be negotiated between the client and server. The mechanism, as described in RFC1651, is open-ended: Two possible extensions were defined in RFC1652 and RFC1653.

RFC1652 defines 8-bit MIME encoding, which enables a user to send 8-bit data in mail messages without having to recode the data using base64, quoted-printable, or some other encoding method. This also eliminates the breakage that can result from sending 8-bit data to an RFC821-compliant SMTP server that doesn’t know what to do with the components it receives.

Message size declaration (defined in RFC1653) offers a method for a server to limit the size of a message it is prepared to accept. With RFC821 SMTP, the only possibility is for the server to discard the message after it has been sent in its entirety and after the message has crossed the network onto the server. Unfortunately, this is a waste of bandwidth, and there is no way for the mail client to know that the message was discarded because of its size.

Other extensions possible with ESMTP include requesting a delivery status notification on outgoing messages (so senders can be notified when messages arrive at their destination) and negotiating encryption between secure mailservers for more secure mail.


Previous Table of Contents Next