Useful Tables

This chapter contains ten useful tables that cover headers and their use:

Header Names

The name portion of the H configuration command must be one of the names shown in Table 25-2. Other names do not produce an error but might confuse other programs that process them. Names marked with an asterisk are defined by RFC2822.

Table 25-2. Header names

apparently-to

bcc*

cc*

comments*

content-length

content-transfer-encoding

content-type

date*

delivery-receipt-to

disposition

encrypted

errors-to

from*

full-name

in-reply-to*

keywords*

mail-from

message

message-id*

notification-to

posted-date

precedence

received*

references*

reply-to*

resent-bcc*

resent-cc*

resent-date*

resent-from*

resent-message-id*

resent-reply-to

resent-sender*

resent-to*

return-path*

return-receipt-to

sender*

subject

text

to*

via

x400-received

Header Behavior in conf.c

The sendmail program has a built-in understanding of many header names. How those names are used is determined by a set of flags in the source file that conf.c supplied with the source distribution. Site policy determines which flags are applied to which headers, but in general, conf.c applies them in the way that is best suited for almost all Internet sites.

If you desire to redefine the flags for a particular header name, look for the name’s declaration in the C-language structure definition HdrInfo in conf.c. Be sure to read the comments in that file. Changes to header flags represent a permanent site policy change and should not be undertaken lightly.

The flags that determine header use are listed in Table 25-3. Note that each flag name is prefixed with an H_.

Table 25-3. Header flags in conf.c

Flag

sendmail text reference

Version

Description

H_ACHECK

§25.6.1[3ed]

V5 and above

Always process ? flags ?

H_BCC

§25.6.2[3ed]

V8.7 and above

Strip value from header

H_BINDLATE

§25.6.3[3ed]

V8.10 and above

Expand macros at time of delivery only

H_CHECK

§25.6.4[3ed]

V5 and above

Process ? flags ?

H_CTE

§25.6.5[3ed]

V8.7 and above

Is “content transfer encoding”

H_CTYPE

§25.6.6[3ed]

V8.7 and above

Is “content type”

H_DEFAULT

§25.6.7[3ed]

V5 and above

If already in headers, don’t insert

H_ENCODABLE

§25.6.8[3ed]

V8.8 and above

Field can be RFC2047-encoded

H_EOH

§25.6.9[3ed]

V5 and above

Terminates all headers

H_ERRSTO

§25.6.10[3ed]

V8.1 to V8.6

An Errors-to: header

H_ERRORSTO

§25.6.10[3ed]

V8.7 and above

An Errors-to:-type header

H_FORCE

§25.6.11[3ed]

V5 and above

Insert header (allows duplicates)

H_FROM

§25.6.12[3ed]

V5 and above

Contains a sender address

H_RCPT

§25.6.13[3ed]

V5 and above

Contains a recipient address

H_RECEIPTTO

§25.6.14[3ed]

V8.7 and above

Header field has return-receipt information

H_RESENT

§25.6.15[3ed]

V5 and above

Is a Resent- header

H_STRIPCOMM

§25.6.16[3ed]

V8.10 and above

Strip comments for header checks

H_TRACE

§25.6.17[3ed]

V5 and above

Count these to get the hop count

H_USER

§25.6.18[3ed]

V8.11 and above

Came from a local user via SMTP

H_VALID

§25.6.19[3ed]

V5 and above

Has a validated field value

Headers and mc Configuration

Table 25-4 lists a number of m4 macros that you may use in your mc configuration file. They deal directly with headers.

Table 25-4. Header-related mc macros

Macro

sendmail text reference

Sets What

confFROM_HEADER

§25.12.18[3ed]

Define the format for the From: header

confRECEIVED_HEADER

§25.12.29[3ed]

Define the format for the Received: header

confOLD_STYLE_HEADERS

§24.9.76[3ed]

Declare the OldStyleHeaders option

confMAX_HEADERS_LENGTH

§24.9.61[3ed]

Declare the MaxHeadersLength option

confMAX_MIME_HEADER_LENGTH

§24.9.64[3ed]

Declare the MaxMimeHeaderLength option

confSINGLE_LINE_FROM_HEADER

§24.9.103[3ed]

Declare the SingleLineFromHeader option

confUSE_ERRORS_TO

§24.9.116[3ed]

Declare the UseErrorsTo option, which affects the Errors-To: header

confNO_RCPT_ACTION

§24.9.75[3ed]

Declare the NoRecipientAction option, which affects the To:, Cc:and Bcc: headers

confRRT_IMPLIES_DSN

§24.9.93[3ed]

Declare the RrtImpliesDsn option, which affects the Return-Receipt-To: header

confMESSAGEID_HEADER

Section 25.1.2 [V8.13]

Declares the Message-Id: header format

Sender Headers

Certain header name s 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 (§25.6.12) are rewritten as sender addresses.

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

Header

sendmail text reference

Flags

Defined by

Resent-Sender:

§25.2.10[3ed]

H_FROM, H_RESENT

RFC2822

Resent-From:

§25.12.18[3ed]

H_FROM, H_RESENT

RFC2822

Resent-Reply-To:

§25.2.10[3ed]

H_FROM, H_RESENT

RFC2822

Return-Path:

§25.12.32[3ed]

H_FORCE, H_ACHECK, H_BINDLATE

RFC2822

Sender:

§25.12.34[3ed]

H_FROM

RFC2822

From:

§25.12.18[3ed]

H_FROM

RFC2822

Apparently-From:

§25.12.1[3ed]

n/a

Smail 3.0

Reply-To:

§25.12.31[3ed]

H_FROM

RFC2822

Disposition-Notification-To:

§25.12.15[3ed]

H_FROM

RFC2298

Return-Receipt-To:

§25.12.33[3ed]

H_RECEIPTTO

Obsolete

Delivery-Receipt-To:

§25.12.33[3ed]

H_RECEIPTTO

As of V8.13, a synonym for Return-Receipt-To:

Errors-To:

§25.12.17[3ed]

H_FROM, H_ERRORSTO

sendmail (deprecated)

Full-Name:

§25.12.19[3ed]

H_ACHECK

UUCP (obsolete)

Note that 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 (§24.9.116[3ed]) is set, a copy of the bounced mail is also sent to the address in that header.

Recipient Headers

Recipient headers are those from which one or more recipients can be parsed. Addresses in headers with the H_RCPT flag (§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

sendmail text reference

Flags

Defined by

To:

§25.12.37[3ed]

H_RCPT

RFC2822

Resent-To:

§25.2.10[3ed]

H_RCPT, H_RESENT

RFC2822

Cc:

§25.12.5[3ed]

H_RCPT

RFC2822

Resent-Cc:

§25.2.10[3ed]

H_RCPT, H_RESENT

RFC2822

Bcc:

§25.12.4[3ed]

H_RCPT, H_BCC

RFC2822

Resent-Bcc:

§25.2.10[3ed]

H_RCPT, H_BCC, H_RESENT

RFC2822

Apparently-To:

§25.12.2[3ed]

H_RCPT

Obsolete

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

sendmail text reference

Flags

Defined by

Message-ID:

§25.12.23[3ed]

none

RFC2822

Resent-Message-Id:

§25.2.10[3ed]

H_RESENT

RFC2822

Message:

§25.12.24[3ed]

H_EOH

Obsolete

Text:

§25.12.36[3ed]

H_EOH

Obsolete

Precedence:

§25.10[3ed]

n/a

All sendmails

Priority:

§25.12.28[3ed]

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.

Date and Trace Headers

Date headers are used to document the date and time that a mail message was sent or forwarded. Trace headers (those with an H_TRACE header flag; §25.6.17[3ed]) 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

sendmail text reference

Flags

Defined by

Date:

§25.12.13[3ed]

none

RFC2822

Posted-Date:

§25.12.26[3ed]

n/a

Obsolete

Resent-Date:

§25.2.10[3ed]

H_RESENT

RFC2822

Received:

§25.12.29[3ed]

H_TRACE, H_FORCE

RFC2822

Via:

§25.12.38[3ed]

H_TRACE, H_FORCE

Obsolete

Mail-From:

§25.12.22[3ed]

H_TRACE, H_FORCE

Obsolete

X-Authentication-Warning:

§25.12.39[3ed]

H_FORCE

V8 sendmail

X400-Received:

§25.12.40[3ed]

H_TRACE, H_FORCE

IDA and V8 only

Other Headers

Some 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

sendmail text reference

Flags

Defined by

In-Reply-To:

§25.12.20[3ed]

n/a

RFC2822

References:

§25.12.30[3ed]

n/a

RFC2822

Keywords:

§25.12.21[3ed]

n/a

RFC2822

Subject:

§25.12.35[3ed]

H_ENCODABLE

RFC2822

Comments:

§25.12.6[3ed]

H_FORCE, H_ENCODABLE

RFC2822

Encrypted:

§25.12.16[3ed]

n/a

RFC822

Content-Length:

§25.12.10[3ed]

H_ACHECK

SysV

MIME Headers

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

Table 25-10. MIME headers

Header

sendmail text reference

Flags

Defined by

MIME-Version:

§25.12.25[3ed]

n/a

RFC2045

Content-Disposition:

§25.12.8[3ed]

n/a

RFC2183

Content-Id:

§25.12.9[3ed]

n/a

RFC2045

Content-Transfer-Encoding:

§25.12.11[3ed]

H_CTE

RFC2045

Content-Type:

§25.12.11[3ed]

H_CTYPE

RFC2045

Forwarding with Resent Headers

Some MUAs allow users to forward (resend, bounce, or redirect) messages to other users. For example, the mush(1) MUA forwards the current message to the user named fred with the following command:

message 1 of 3> m -f fred

Messages can also be forwarded with dist(1) from mh(1) and from within other MUAs.

When messages are forwarded, header lines that describe the forwarding user must begin with the Resent- prefix. When a user receives such a message, that user sees two similar header lines:

From: original-sender
Resent-From: forwarding-sender

When both the original From: and the forwarded Resent-From: appear in the same header, the Resent- form is always considered the most recent.

If sendmail finds any header with a name beginning with Resent-, it marks that message as one that is being forwarded, preserves all Resent- headers, and creates any needed ones.

The few header names sendmail examines to see whether a mail message has been forwarded are listed in Table 25-11.

Table 25-11. Known resent headers

Resent- form of

Header

Resent-Bcc:

Bcc:

Resent-Cc:

Cc:

Resent-Date:

Date:

Resent-From:

From:

Resent-Message-ID:

Message-ID:

Resent-Reply-To:

Reply-To:

Resent-Sender:

Sender:

Resent-To:

To:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.159.150