PMDF System Manager's Guide
PMDF-REF-6.0


Previous | Contents

2.2.6.8 Single field substitutions, $&, $!, $*, $#

Single field substitutions extract a single subdomain part from the host/domain specification being rewritten. The available single field substitutions are shown in Table 2-4 .

Table 2-4 Single field substitutions
Control Sequence Usage
$&n Substitute the nth element, n=0,1,2,..,9, in the host specification (the part that did not match or matched a wildcard of some kind). Elements are separated by dots; the first element on the left is element zero. The rewrite fails if the requested element does not exist.
$!n Substitute the nth element, n=0,1,2,..,9, in the host specification (the part that did not match or matched a wildcard of some kind). Elements are separated by dots; the first element on the right is element zero. The rewrite fails if the requested element does not exist.
$*n Substitute the nth element, n=0,1,2,...,9, in the domain specification (the part that did match explicit text in the pattern). Elements are separated by dots; the first element on the left is element zero. The rewrite fails if the requested element does not exist.
$#n Substitute the nth element, n=0,1,2,...,9, in the domain specification (the part that did match explicit text in the pattern). Elements are separated by dots; the first element on the right is element zero. The rewrite fails if the requested element does not exist.

Suppose the address jdoe@vaxa.acme.com matches the rewrite rule

*.ACME.COM     $U%$&0.acme.com@mailhub.acme.com 
Then the result from the template will be jdoe@vaxa.acme.com with mailhub.acme.com used as the routing system.


Previous | Next | Contents