Previous Section Next Section

$&

Delay macro expansion until runtime LHS and RHS operator

Normally, sendmail macros are expanded (replaced with their values) when the configuration file is read. For those situations when a sendmail macro should not be expanded, but rather should be used in rules as is, V8 sendmail offers the $& prefix. For example, consider the following RHS of a rule:

R...     $w.$&M

Normally, when sendmail encounters this RHS in the configuration file, it will recursively expand $w into its final text value (where that text value is your hostname, such as wash.dc.gov). But because the M sendmail macro is prefixed (here, with $&) it is not expanded until the rule is processed.

The $& operator can be used in either the LHS or RHS of a rule. The $& operator is described in full in Section 21.5.3.

    Previous Section Next Section