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


Previous Section Next Section

R=

Recipient rewriting rule set All versions

The R= delivery agent equate specifies a rule set to be used for processing all envelope- and header-recipient addresses for a specific delivery agent. Mail messages are always addressed to at least one recipient, but there can be more. The addresses of the recipients are given in the envelope and are usually repeated in the mail message's header.[16] The envelope address is given to sendmail in one of three ways: as a command-line argument; as a RCPT TO: command; or as To:, Cc:, and Bcc: headers (if the -t command-line switch is given).[17] Figure 20-1 shows how the R= rule set fits into the flow of addresses through rule sets.

[16] They, in fact, often differ. For example, if the address has been forwarded or aliased, or has undergone mailing-list expansion, the header and the envelope will probably differ.

[17] The -t switch is intended for initial submissions only.

Figure 20-1. The flow of addresses through rule sets
figs/sm3.2001.gif

There are two forms for the R= delivery agent equate. One is the standard form, and the other is an enhanced alternative beginning with V8 sendmail:

R=ruleset          legal for all 
R=eset/hset        legal beginning with V8 

In the first case, ruleset specifies the rule set to use in rewriting both headers and the envelope. If that value is zero or if the entire R= delivery agent equate is missing, no rule set is called.

In the second case, two rule sets can be specified.[18] One rule set is specific to the envelope, and the other is specific to headers. The envelope-specific rule set is the one to the left of the slash; the header-specific rule set is to the right (R=eset/hset). If both values are missing, both default to zero. If only one is missing, the missing value defaults to the other value.

[18] This form was inspired by an identical form in IDA sendmail.

Either rule set can be specified by using names or numbers, or both:

R=Myset                name
R=12                   number
R=Myset=12             both

See Chapter 19 for a description of possible errors and how the new V8.7 symbolic rule set names can be used.

Macros cannot be used in delivery agent rule set specifications. That is:

R=$X                   illegal

will not give the expected result. Instead, sendmail will complain about a missing rule set specification.

When using V8 sendmail's mc configuration, you cannot change or specify R= rule sets. If the need arises, however, you can copy an existing delivery agent definition and then modify it as outlined in Section 20.3.2.

    Previous Section Next Section