Previous | Contents | Index |
It is possible to have rewrite rules that act only in conjunction with specific source channels. This is useful when a shortform name has two meanings, one when it appears in a message arriving on one channel and another when it appears in a message arriving on a different channel.
Source channel-specific rewriting is associated with the channel program in use and the channel keywords rules
and norules
. If norules
is specified on the channel associated with a PMDF component that is doing the rewriting, no channel-specific rewrite checking is done. If rules
is specified on the channel, channel-specific rule checks are enforced. rules
is the default.
Source channel-specific rewriting is not associated with the channel a given address matches. It depends only on the PMDF component doing the rewriting and that component's channel table entry.
Channel-specific rewrite checking is triggered by the presence of a $N or $M control sequence in the template part of a rule. The characters following the $N or $M, up until either an at sign, percent sign, or subsequent $N, $M, $Q, $C, $T, or $? are interpreted as a channel name.
$Mchannel causes the rule to fail if the channel channel is not currently doing the rewriting. $Nchannel causes the rule to fail if the channel channel is doing the rewriting.
Multiple $M and $N clauses may be specified. If any one of multiple $M clauses matches, the rule will succeed. If any of multiple $N clauses matches, the rule will fail.
For example, suppose that the shortform host name ACUVAX is both a local DECnet host and a BITNET host. For local use, it probably makes sense for any use of ACUVAX to map to the DECnet host. But for messages coming in on the BITNET channel, interpreting this name as the BITNET host would be more appropriate.
This problem might be solved with rewrite rules of the form given below; the use of Jnet and not ANJE is assumed in this example.
acuvax $U%acuvax.bitnet@Jnet-DAEMON$Mbit_local acuvax.bitnet $U%acuvax.bitnet@Jnet-DAEMON acuvax $U%acuvax.decnet@decnet-mail acuvax.decnet $U%acuvax.decnet@decnet-mail |
Previous | Next | Contents | Index |