Network Working Group Mark. R. Horton
Request for Comments: 976 Bell Laboratories
February 1986
UUCP Mail Interchange Format Standard
1. Introduction
This document is intended to define the standard format for the transmission of mail messages between machines in the UUCP Project. It does not address the format for storage of messages on one machine, nor the lower level transport mechanisms used to get the data from one machine to the next. We assume remote execution of the rmail command (or equivalent) as the UUCP network primitive operation.
Horton [Page 1]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
This document specifies an interpretation of RFC-822 and RFC-920 in the UUCP world. It shows how the envelope should be encoded, and how UUCP routing is accomplished in an environment of mixed implementations.
2. Basics
Messages can be divided into two parts: the envelope and the message. The envelope contains information needed by the mail transport services, and the message contains information useful to the sender and receiver. The message is divided into the header and the body. Sometimes an intermediate host will add to the message (e.g. a Received line) but, except in the case of a gateway which must translate formats, it is not expected that intermediate hosts will change the message itself. In the UUCP world, the envelope consists of the "destination addresses" (normally represented as the argument or arguments to the rmail command) and the "source path" (normally represented in one or more lines at the beginning of the message beginning either "From " or ">From ", sometimes called "From_ lines".) The RFC-822 header lines (including "From:" and "To:") are part of the message, as is the text of the message body itself.
Horton [Page 2]
RFC 976 February 1986 UUCP Mail Interchange Format Standard 2.1 Hybrid AddressesThere are (among others) two major kinds of mailing address syntax used in the UUCP world. The a!b!c!user ("bang paths") is used by older UUCP software to explicitly route mail to the destination. The user@domain ("domain") syntax is used in conformance to RFC-822. Under most circumstances, it is possible to look at a given address and determine which sort of address it is. However, a hybrid address with a ! to the left of an @, such as a!b@c, is ambiguous: it could be interpreted as (a!b)@c.d or a!(b@c.d). Both interpretations can be useful. The first interpretation is required by RFC-822, the second is a de-facto standard in the UUCP software.
2.2 Transport
Since SMTP is not available to much of the UUCP domain, we define the method to be used for "remote execution" based transport mechanisms. The command to be "remotely executed" should read
Horton [Page 3]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
rmail a!b!c!domain!user
2.3 Batch SMTP
Standard conforming implementations may optionally support a protocol called "Batch SMTP". SMTP (Simple Mail Transfer Protocol) is the ARPA community standard mail transfer protocol (RFC-821). It is also used on BITNET and Mailnet. While SMTP was designed to be interactive, it is possible to batch up a series of commands and send them off to a remote machine for batch execution. This is used on BITNET, and is appropriate for UUCP. One advantage to BSMTP is that the UNIX shell does not get involved in the interpretation of messages, so it becomes possible to include special characters such as space and parentheses in electronic messages. (Such characters are expected to be popular in X.400 addresses.)
b-smtp: "|egrep '^#' | sed 's/^#//' | /usr/lib/sendmail -bs"
which will feed the commands to an SMTP interpreter. A better solution would appropriately check for errors and send back an error message to the sender. An example BSMTP message from seismo.CSS.GOV to cbosgd.ATT.COM is shown here. This sample is the file shipped over the UUCP link for in put to the command "rmail b-smtp". Note that the RFC- 822 message is between the DATA line and the period line. The envelope information is passed in the MAIL FROM and RCPT TO lines. The name of the sending system is in the HELO line. The actual envelope information (above the # lines) is ignored and need not be present.
Horton [Page 4]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
From foo!bar Sun Jan 12 23:59:00 1986 remote from seismo Date: Tue, 18 Feb 86 13:07:36 EST From: mark@ucbvax.Berkeley.EDU Message-Id: <8602181807.AA10228@mark@ucbvax.Berkeley.EDU> To: b-smtp@cbosgd.ATT.COM
2.4 Envelope
The standard input of the command should begin with a single line
Horton [Page 5]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
The receiving system may discard extra "From_" lines if it folds the information into a a single From_ line. It passes the path!domain!user along as the "envelope" information containing the address of the sender of the message, and possibly preserves the forwarding date and system in a newly generated header line, such as Received or Sent-By. (Adding Received using this information is discouraged, since the line appears to have been added on a different system than the one actually adding it. That other system may have actually included a Received line too! The Sent-By line is similar to Received, but the date need not be converted into RFC-822 format, and the line is not claimed to have been added by the system whose name is mentioned.)
2.5 Routing
In order to properly route mail, it is sometimes necessary to know what software a destination or intermediate machine is running, or what conventions it follows. We have tried to minimize the amount of this information that is necessary, but the support of subdomains may require that different methods are used in different situations. For purposes of predicting the behavior of other hosts, we divide hosts into three classes. These classes are:
Horton [Page 6]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
and bang paths
3. Algorithm
The algorithm for delivering a message to an address "user@domain" over UUCP links can be summarized as follows:
Horton [Page 7]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
b. Determine d: the most specific part of "domain" that is recognized locally. This part will be a suffix of "domain". This can be done by scanning through a table with entries that go from specific to general, comparing entries with "domain" to see if the entries are at the tail of "domain". For example, with the address "mark@osgd.cb.att.com", if the local host recognizes "uucp" and "att.com", d would be "att.com". The final entry in the table will be the null string, matching any completely unrecognized domain.
Horton [Page 8]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
If the gateway is known to be class 3, domain ! form may be used, but if the sending site is not sure, and the entire destination string was matched in the lookup (rather than some parent domain), the 6 letter ! form should be used: r!user, for example: dumbhost!host!user. If the gateway appears to actually be a gateway for a subdomain, e.g. because a parent domain was matched, (such as the address user@host.gateway.com, where host.gateway.com was not found but gateway.com was) it can be assumed to be at class 3. This allows routes such as dumbhost!domain!host.domain.com!user to be used with a reasonable degree of safety. If a direct link exists to the destination host, the user@domain syntax or the domain!user syntax may be used.
4. Example
Suppose host A.D.COM sends mail to host C.D.COM. Let's suppose that the 6 letter names for these hosts are aname and dname, and that the intermediate host to be routed through has name bname.
Horton [Page 9]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
sendmail user@c.d.com < file
Horton [Page 10]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
The command
5. Summary
Hosts conforming to this standard should accept all of the following forms:
6. References
[1] Postel, J., "Simple Mail Transfer Protocol", RFC-821,
Horton [Page 11]
RFC 976 February 1986
UUCP Mail Interchange Format Standard
[3] Postel, J., and J. K. Reynolds, "Domain Requirements", RFC-920,