sendmailSearch this book
Previous: 29.1 The S Configuration CommandChapter 29
Rule Sets
Next: 29.3 The Sequence of Rule Sets

29.2 Rule Sets and m4

When building a configuration file using the m4 technique (see Section 19.1, "The m4 Preprocessor"), sendmail reserves certain rule-set numbers for its own use. Using the m4 technique, you can add rules to those rule sets, but you cannot replace those rule sets with your own. A few m4 keywords are available to make adding rules easier. They affect rule sets 0 through 3 directly and other rule sets indirectly (see Table 19.5 in Section 19.4.3, "Rules and rule sets").

The configuration file created with the m4 technique uses quite a few rule sets beyond the base group of 0 through 5. Table 29.1 shows all the rule sets used by the bare bones m4 technique. They are listed numerically, which also just happens to group them by function. The table also includes the name of the file containing the rules for each rule set.

Table 29.1: Rule Sets Used by the m4 Technique
S0m4/proto.m4Select a delivery agent
S1m4/cfhead.m4Process all sender addresses
S2m4/cfhead.m4Process all recipient addresses
S3m4/proto.m4Preprocess all addresses
S4m4/proto.m4Postprocess all addresses
S5m4/proto.m4Post alias select a delivery agent
S10mailer/local.m4Handle S= for local delivery agent
S11mailer/smtp.m4Handle S= for smtp delivery agents
S12mailer/uucp.m4Handle S= for uucp delivery agents
S15mailer/mail11.m4Handle S= for mail11 delivery agent
S20mailer/local.m4Handle envelope R= for local delivery agent
S21mailer/smtp.m4Handle envelope R= for smtp delivery agents
S22mailer/uucp.m4Handle envelope R= for uucp delivery agents
S25mailer/mail11.m4Handle envelope R= for mail11 delivery agent
S30mailer/local.m4Handle <@> and masquerading for local delivery agent
S31mailer/smtp.m4Handle ALL_MASQUERADE envelope R= for smtp
S40mailer/local.m4Handle header R= for local delivery agent
S42mailer/uucp.m4Handle header R= for uucp delivery agents
S50mailer/local.m4Rules to add local domain (if ALWAYS_ADD_DOMAIN)
S51mailer/smtp.m4Convert pseudo-domains to real domains
S52mailer/uucp.m4Handle envelope S= for uucp-dom delivery agent
S61mailer/smtp.m4Handle ALL_MASQUERADE envelope R= for relay agent
S71mailer/smtp.m4Handle envelope header R= for relay agent
S72mailer/uucp.m4Handle envelope S= for uucp-uudom delivery agent
S90m4/proto.m4Try domain part of mailertable entry
S93m4/proto.m4Convert header names to masqueraded form
S94m4/proto.m4Convert envelope names to masqueraded form
S95m4/proto.m4Canonify mailer:[user@]host syntax to triple
S96m4/proto.m4Handle common rule set 3 needs
S98m4/proto.m4Handle local part of rule set 0

Previous: 29.1 The S Configuration CommandsendmailNext: 29.3 The Sequence of Rule Sets
29.1 The S Configuration CommandBook Index29.3 The Sequence of Rule Sets