DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SMM:08-38
Sendmail Installation and Operation Guide
will get a copy of the message. If the MeToo option is set to
FALSE
(in the configuration file or via
the command line), this behavior is changed, i.e., the (envelope) sender is excluded in list expan-
sions.
5. THE WHOLE SCOOP ON THE CONFIGURATION FILE
This section describes the configuration file in detail.
There is one point that should be made clear immediately: the syntax of the configuration file is
designed to be reasonably easy to parse, since this is done every time sendmail starts up, rather than
easy for a human to read or write. The configuration file should be generated via the method described
in cf/README, it should not be edited directly unless someone is familiar with the internals of the
syntax described here and it is not possible to achieve the desired result via the default method.
The configuration file is organized as a series of lines, each of which begins with a single charac-
ter defining the semantics for the rest of the line. Lines beginning with a space or a tab are continuation
lines (although the semantics are not well defined in many places). Blank lines and lines beginning
with a sharp symbol (`#') are comments.
5.1. R and S -- Rewriting Rules
The core of address parsing are the rewriting rules. These are an ordered production system.
Sendmail scans through the set of rewriting rules looking for a match on the left hand side (LHS) of
the rule. When a rule matches, the address is replaced by the right hand side (RHS) of the rule.
There are several sets of rewriting rules. Some of the rewriting sets are used internally and
must have specific semantics. Other rewriting sets do not have specifically assigned semantics, and
may be referenced by the mailer definitions or by other rewriting sets.
The syntax of these two commands are:
Sn
Sets the current ruleset being collected to n. If you begin a ruleset more than once it appends to the
old definition.
Rlhs rhs comments
The fields must be separated by at least one tab character; there may be embedded spaces in the
fields. The lhs is a pattern that is applied to the input. If it matches, the input is rewritten to the rhs.
The comments are ignored.
Macro expansions of the form $x are performed when the configuration file is read. A literal
$
can be included using $$. Expansions of the form $&x are performed at run time using a some-
what less general algorithm. This is intended only for referencing internally defined macros such as
$h
that are changed at runtime.
5.1.1. The left hand side
The left hand side of rewriting rules contains a pattern. Normal words are simply
matched directly. Metasyntax is introduced using a dollar sign. The metasymbols are:
$*
Match zero or more tokens
$+
Match one or more tokens
$-
Match exactly one token
$=x
Match any phrase in class x
$~x
Match any word not in class x
If any of these match, they are assigned to the symbol $n for replacement on the right hand side,
where n is the index in the LHS. For example, if the LHS:
$-:$+