Previous Section Next Section

25.8 Headers by Category

The sendmail program contains an internal list of header names that are organized conceptually into categories. The names and categories are defined in conf.c (Section 25.6). Each category is defined by one or more H_ flags in that file, the names of which are listed under the Flags column of all the tables that follow.

25.8.1 Recommended Headers

Every sendmail.cf file should have a minimal complement of header definitions. Here we present a recommendation. Don't use this as is. The details are not generic to all versions of sendmail, nor are they appropriate for all sites:

H?P?Return-Path: $g
HReceived: $?sfrom $s $.by $j ($v/$V) id $i; $b    mandatory
H?D?Date: $a                                       mandatory
H?F?From: $q                                       mandatory
H?x?Full-Name: $x
H?M?Message-Id: <$t.$i@$j>    mandatory
H?D?Resent-Date: $a    mandatory
H?F?Resent-From: $q    mandatory
H?M?Resent-Message-Id: <$t.$i@$j>    mandatory

Each of these is described individually at the end of this chapter. Except for Received: (Received:), none is added to any mail message that already has that particular header present.

The Return-Path: header (Return-Path:) is added only if it is not already present and if the delivery agent for the recipient has the F=P flag present. Similarly, the Date: relies on F=D, the From: relies on F=F, the Full-Name: relies on F=x, and the Message=Id: relies on F=M.

Of those shown, only the seven indicated are truly mandatory and must be declared in every configuration file. The others are highly recommended.

25.8.2 Sender Headers

Certain header names are assumed by sendmail to contain information about the various possible senders of a mail message. They are listed in Table 25-5 in descending order of significance. Addresses with the H_FROM flag (Section 25.6.12) are rewritten as sender addresses.

Table 25-5. Sender headers (most to least significant)

Header

§

Flags

Defined by

Resent-Sender:

Section 25.9

H_FROM, H_RESENT

RFC2822

Resent-From:

From:

H_FROM, H_RESENT

RFC2822

Resent-Reply-To:

Section 25.9

H_FROM, H_RESENT

RFC2822

Sender:

Sender:

H_FROM

RFC2822

From:

From:

H_FROM

RFC2822

Apparently-From:

Apparently-From:

n/a

Smail 3.0

Reply-To:

Reply-To:

H_FROM

RFC2822

Disposition-Notification-To:

Disposition-Notification-To:

H_FROM

RFC2298

Return-Receipt-To:

Return-Receipt-To:

H_RECEIPTTO

Obsolete

Errors-To:

Errors-To:

H_FROM, H_ERRORSTO

sendmail (deprecated)

Full-Name:

Full-Name:

H_ACHECK

UUCP (obsolete)

When returning bounced mail, sendmail always uses the envelope sender's address. If the special header Errors-To: appears in the message, and if the UseErrorsTo option (UseErrorsTo) is set, a copy of the bounced mail is also sent to the address in that header.

25.8.3 Recipient Headers

Recipient headers are those from which one or more recipients can be parsed. Addresses in headers with the H_RCPT flag (Section 25.6.13) are rewritten as recipient addresses. When sendmail is invoked with the -t command-line switch, it gathers a list of recipients from all the headers marked with an H_RCPT flag and delivers a copy of the message to each.

The list of recipient headers used by sendmail is shown in Table 25-6.

Table 25-6. Recipient headers

Header

§

Flags

Defined by

To:

To:

H_RCPT

RFC2822

Resent-To:

Section 25.9

H_RCPT, H_RESENT

RFC2822

Cc:

Cc:

H_RCPT

RFC2822

Resent-Cc:

Section 25.9

H_RCPT, H_RESENT

RFC2822

Bcc:

Bcc:

H_RCPT, H_BCC

RFC2822

Resent-Bcc:

Section 25.9

H_RCPT, H_BCC, H_RESENT

RFC2822

Apparently-To:

Apparently-To:

H_RCPT

Obsolete

25.8.4 Identification and Control Headers

Some headers serve to uniquely identify a mail message. Others affect the way sendmail processes a mail message. The complete list of all such identification and control headers is shown in Table 25-7.

Table 25-7. Identification and control headers

Header

§

Flags

Defined by

Message-ID:

Message-ID:

none

RFC2822

Resent-Message-Id:

Section 25.9

H_RESENT

RFC2822

Message:

Message:

H_EOH

Obsolete

Text:

Text:

H_EOH

Obsolete

Precedence:

Section 25.10

n/a

All sendmails

Priority:

Priority:

n/a

Many (maps to X.400)

Note that the Precedence: and Posted-Date: headers (discussed next) are hardcoded into sendmail rather than being declared in conf.c.

25.8.5 Date and Trace Headers

Date headers are used to document the date and time that the mail message was sent or forwarded. Trace headers (those with an H_TRACE header flag; Section 25.6.17) are used to determine the hop count of a mail message and to document the message's travel from machine to machine. The list date and trace headers are shown in Table 25-8.

Table 25-8. Date and trace headers

Header

§

Flags

Defined by

Date:

Date:

none

RFC2822

Posted-Date:

Posted-Date:

n/a

Obsolete

Resent-Date:

Section 25.9

H_RESENT

RFC2822

Received:

Received:

H_TRACE, H_FORCE

RFC2822

Via:

Via:

H_TRACE, H_FORCE

Obsolete

Mail-From:

Mail-From:

H_TRACE, H_FORCE

Obsolete

X-Authentication-Warning:

X-Authentication-Warning:

H_FORCE

V8 sendmail

X400-Received:

X400-Received:

H_TRACE, H_FORCE

IDA and V8 only

25.8.6 Other Headers

Other headers that you will see in mail messages are defined by the RFC2822 standard but are not otherwise internally defined by sendmail. A few of them, such as Return-Path:, should be declared in the configuration file. The others are usually inserted by MUAs. Table 25-9 lists these other headers.

Table 25-9. Other headers

Header

§

Flags

Defined by

Return-Path:

Return-Path:

H_FORCE, H_ACHECK, H_BINDLATE

RFC2822

In-Reply-To:

In-Reply-To:

n/a

RFC2822

References:

References:

n/a

RFC2822

Keywords:

Keywords:

n/a

RFC2822

Subject:

Subject:

H_ENCODABLE

RFC2822

Comments:

Comments:

H_FORCE, H_ENCODABLE

RFC2822

Encrypted:

Encrypted:

n/a

RFC822

Content-Length:

Content-Length:

H_ACHECK

SysV

25.8.7 MIME Headers

MIME is documented in RFC2045, RFC2046, RFC2047, RFC2048, and RFC2049. The sendmail program cares about MIME only when bouncing messages and when determining how to convert the message body between 8 and 7 bits. Those MIME headers for which sendmail contains special knowledge are shown in Table 25-10.

Table 25-10. MIME headers

Header

§

Flags

Defined by

MIME-Version:

MIME-Version:

n/a

RFC2045

Content-Disposition:

Content-Disposition:

n/a

RFC2183

Content-Id:

Content-Id:

n/a

RFC2045

Content-Transfer-Encoding:

Content-Transfer-Encoding:

H_CTE

RFC2045

Content-Type:

Content-Type:

H_CTYPE

RFC2045

    Previous Section Next Section