home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

From:

The sender RFC2822

The From: header lists the address of one or more senders, where each sender address can be in one of four legal forms:

address
 <address>
Full Name <address>
address (comment)

When the From: header lists multiple senders (in the sense that there can be multiple authors) each must be separated from the others by commas:

From: address, address

Here, address specifies destination mailboxes, and each can be in any of the four basic forms shown earlier. When multiple senders (authors) are in the From: header, the presence of the Sender: header (Sender:) is mandatory and must show the address of the agent responsible for actual transmission. When a single author is in the From: header, and when the author and transmitter differ, the Sender: header must show the address of the actual transmitter. When author and transmitter are the same, the Sender: header can be omitted.

A From: header must be declared in the configuration file, and its field is composed of the $x ($x) and $g ($g) macros. For example:

H?F?From: $?x$x <$g>$|$g$.

$g contains the official return address of the sender. $x contains the full name for the sender. $x can be undefined for some addresses, so it should be wrapped in the $? and $. conditional operators (Section 21.6).

The From: header must be prefixed by the ?F? flag because all the traditional delivery agents use the F=F flag (F=F) to force inclusion of that header. Use of the ?F? flag allows new delivery agents to be written that don't require the From: header.

The resent- form of the From: header must also be declared in the configuration file:

H?F?Resent-From: $?x$x <$g>$|$g$.

This ensures that every mail message has a sender, even if the mail message has been resent.

Note that sendmail does not add the From: header or its resent- form if a From: header already exists in the header portion of the mail message. A possible exception occurs if the envelope sender is identical to the address in the From: header. In that instance, the From: header is discarded and a new one is created (Section 25.9.1).

    Previous Section Next Section