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:
Macro expansions of the form $ x are performed when the configuration file is read. Expansions of the form $& x are performed at run time using a somewhat less general algorithm. This for is intended only for referencing internally defined macros such as $h that are changed at runtime.