Mail Administration Guide

Purpose of the sendmail Configuration File

The sendmail configuration file has three parts:

You define symbols, classes, options, and parameters to set up the environment for sendmail, setting the options and defining a few critical macros.

You define your mailers and delivery programs so that sendmail uses the correct protocols and interacts with the correct delivery programs.

You define rewriting rules, grouped into rule sets, to transform addresses from one form to another. In general, each rule in a rule set is applied to a particular address. An address might be rewritten several times within a rule set.

Table 3-5 lists the seven standard rule sets, applied in the order shown in.

Table 3-5 Order of Application of Rule Sets

Rule Set 

Description 

3

The first rule set applied. It tries to put the address into the form: local-address@host-domain.

0

Determines the destination and which mailer program to use to send the message. It resolves the destination into a triple (mailer, host, user).

1

Rewrites the sender address. 

S

Specifies additional rule sets that enable the sender addresses to do final mailer-specific cleanup. These rule sets have different names for each mailer. S, for example, stands for a generic "sender."

2

Rewrites the recipient address. 

R

Specifies additional rule sets that enable the recipient addresses to do final mailer-specific cleanup. These rule sets have different names for each mailer. R, in this example, stands for a generic "recipient."

4

Rewrites all addresses for the last time, usually from internal to external form. 

Rule set 0 must resolve to the internal form, which is in turn used as a pointer to a mailer descriptor. The mailer descriptor describes the interface requirements of the mailer.

Rewriting names in the message is typically done in two phases. The first phase uses rule set 3 to map names in any format into a local-address@host-domain form. The second phase converts map names to the canonical form into the syntax appropriate for the receiving mailer. sendmail rewrites names in three subphases. Rule sets 1 and 2 are applied to all sender and recipient names respectively. Mailer-specific rule sets are specified during mailer definition. Finally, rule set 4 is applied to do any conversion to external form.

RFC 822 describes the format of the mail message itself. sendmail follows this RFC closely, to the extent that you cannot change many of the standards described in this document without changing the code. In particular, the following characters have special interpretations:

< > ( ) " \


Caution - Caution -

Use the RFC 822 special characters < > ( ) " \ only for their designated purposes. Information between parentheses, (), is reserved for comments or personal names. Information between angle brackets, <>, is reserved for local-address@host-domain addresses.