Source Channel-Specific Rewrite Rules ($M, $N)

Rewrite rules can possibly act only in conjunction with specific source channels. This is useful when a short-form name has two meanings:

  1. When it appears in a message arriving on one channel
  2. 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 an IMTA component that is doing the rewriting, no channel-specific rewrite checking is done. If rules is specified on the channel, then channel-specific rule checks are enforced. rules is the default.

Source channel-specific rewriting is not associated with the channel that matches a given address. It depends only on the IMTA 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.

$M channel causes the rule to fail if the channel channel is not currently doing the rewriting. $N channel 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 succeeds. If any of multiple $N clauses matches, the rules will fail.




Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.