PMDF System Manager's Guide


Previous Next Contents Index

2.2.3.3 Applying the Rewrite Rule Template

Once a host/domain specification matches a rewrite rule, it is rewritten using the template part of the rule. The template specifies three things:

  1. a new username for the address,
  2. a new host/domain specification for the address, and
  3. the name of a system attached to an existing PMDF channel (the "routing system") to which messages to this address should actually be sent.
Template format is discussed in detail in Section 2.2.5. As a quick overview, note that the most common format for templates is A%B@C, where A is the new username, B is the new host/domain specification, and C is the routing system. And the format A@C (which is an abbreviation for A%C@C) is also commonly used.

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 adrian@example.com has matched the rewrite rule


example.com       $U@EXAMPLE.COM 
Then the template will produce the username adrian, the host/domain specification EXAMPLE.COM, and the routing system EXAMPLE.COM. In a slightly more complicated example, assume that the host/domain specification has matched the rewrite rule


.com           $U%$H$D@TCP-DAEMON 
In this case, $U = jdoe, $H = example, and $D = .com. The template produces the username adrian, the host/domain specification example.com, and the routing system TCP-DAEMON.


Previous Next Contents Index