Previous Table of Contents Next


Parts of the sendmail Configuration File

The sendmail configuration file has three parts:

  Definition of symbols, classes, options, and parameters
  Definitions of mailers and delivery programs
  Rulesets that determine the rules for rewriting addresses

You define symbols, classes, options, and parameters to set up the environment for sendmail. You define your mailers and delivery programs so that sendmail knows the protocols to use and the delivery programs with which to interact.

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

There are eight standard rulesets; these are applied in the order shown in Table 4-4.

Table 4-4 Order of Application of Rulesets

Ruleset Description
Ruleset 3 The first ruleset applied; tries to put the address into the canonical form local-address@host-domain.
Ruleset 0 Determines what the destination is, as well as which mailer program to use in order to send mail. It resolves the destination into a triplet (mailer, host, user).
Ruleset D Appends sender domain information to addresses that have no domain specified.
Ruleset 1 Rewrites the sender address.
Ruleset S Each mailer can specify additional rulesets for the sender addresses to perform final mailer-specific cleanup. These rulesets have different names for each mailer. In this example, S stands for a generic "sender."
Ruleset 2 Rewrites the recipient address.
Ruleset R Each mailer can specify additional rulesets for the recipient addresses to perform final mailer-specific cleanup. These rulesets have different names for each mailer. In this example, R stands for a generic "recipient."
Ruleset 4 Rewrites all addresses for the final time, usually from internal to external form.


NOTE:  Rulesets D, S, and R represent rulesets that are specified in one of the mailer configuration statements. For example, R and S might be ruleset 22.

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

Rewriting names in the message typically is completed in two phases. The first phase uses ruleset 3 to map names in any format into a canonical form. The second phase maps the canonical form into the syntax appropriate for the receiving mailer. Names are rewritten by sendmail in three subphases. Rulesets 1 and 2 are applied to all sender and recipient names, respectively. You may specify mailer-specific rulesets in ruleset 3 for both sender and recipient names. Finally, ruleset 4 is applied to do any conversion to external form.

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

<>()"\


CAUTION! Use the RFC 822 special characters < > ( ) " \ only for their designated purposes. Information between parentheses, ( ), is reserved for comments and personal names. Information between angle brackets, < >, is reserved for canonical addresses. The " sign is used to quote strings in an address or identifier. For example, ":sysmail"@somewhere.domain.com. The string is treated literally so that nothing inside it is considered an address until it reaches the system in somewhere.domain.com. The \ is used to escape a single character.


Previous Table of Contents Next