Once a host/domain specification matches a rewrite rule, it is rewritten using the template part of the rule. The template specifies three things:
Substitution strings are allowed in the template. For instance, to mention some of the more commonly used substitution strings, any occurrences of $U in the template are replaced with the username from the original address, any occurrences of $H are replaced with the portion of the host/domain specification that was not matched by the rule, and any occurrences of $D are replaced by the portion of the host/domain specification that was matched by the rewrite rule. Table 2-3 contains a summary of these and other substitution strings which are presented in detail in Section 2.2.6 .
As an example, suppose that the host/domain specification jdoe@acme.com has matched the rewrite rule
acme.com $U@ACME.COMThen the template will produce the username jdoe, the host/domain specification ACME.COM, and the routing system ACME.COM. In a slightly more complicated example, assume that the host/domain specification has matched the rewrite rule
.com $U%$H$D@TCP-DAEMONIn this case, $U = jdoe, $H = acme, and $D = .com. The template produces the username jdoe, the host/domain specification acme.com, and the routing system TCP-DAEMON.