PMDF System Manager's Guide


Previous Next Contents Index

2.2.6.12 Direction and Location-specific Rewrites, $B, $E, $F, $R

It is sometimes useful to specify rewrite rules that only apply to envelope addresses or, alternately, only apply to header addresses. The control sequence $E forces a rewrite to fail if the address being rewritten is not an envelope address. The control sequence $B forces a rewrite to fail if the address being rewritten is not from the message header or body. These sequences have no other effects on the rewrite and may appear anywhere in the rewrite rule template.

Addresses may also be categorized by direction. A forward-pointing address is one that originates on a To:, Cc:, Resent-to:, or other header or envelope line that refers to a destination. A backwards-pointing address is something like a From:, Sender:, or Resent-From:, which refers to a source. The control sequence $F causes the rewrite to fail if the address is backwards-pointing. The control sequence $R causes the rewrite to fail if the address is forward-pointing.

The following rewrite rule causes forward pointing envelope addresses (i.e., envelope To: addresses) of the form user@host.decnet to be rewritten to user@host and the message routed to the channel associated with the host decnet-mail:


.decnet                $U%$H@decnet-mail$E$F 
.decnet                $U@$H.example.com 
All other addresses of the form user@host.decnet are rewritten to user@host.example.com by the second rewrite rule.


Previous Next Contents Index