Special control sequences can also appear in rewrite rule templates. These sequences impose additional conditions to the applicability of a given rewrite rule: not only must the pattern portion of the rewrite rule match the host/domain specification being examined, but other aspects of the address being rewritten must meet conditions set by the control sequence or sequences. For instance, the $E control sequence requires that the address being rewritten be an envelope address, while the $F control sequence requires that it be a forward-pointing address. Thus, the rewrite rule:
acme.com $U@mail.acme.com$E$F
only applies to (rewrite) envelope To: addresses of the form user@acme.com. If a domain/host specification matches the pattern portion of a rewrite rule but doesn't meet all of the criteria imposed by control sequences in the rule's template, then the rewrite rule fails and the rewriter continues to look for other applicable rules. This makes possible sets of rewrite rules such as:
acme.com $U@mail.acme.com$Nverify
acme.com $U%acme.com@verify-daemonwhich results in messages to user@acme.com being passed to the directory channel. However, should the verify channel rewrite a message with the address user@acme.com, that message does not again pass through the verify channel. This then allows all mail to user@acme.com to pass through the verify channel and for the verify channel to send mail to that address without causing a mail loop.
A summary of control sequences is contained in TABLE 3-5.
TABLE 3-5 Summary of Template Control Sequences