Format of the rule definition section
The rule definition section is the next section in any SMTP RULES
data set. It contains the header rewriting rules that define the intended
address transformations, and it is introduced by the following heading:
Rule Definition Section
The
basic form of a rewrite rule is:
alias :before-address-pattern => after-address-pattern;
where
the alias name alias is an optional name representing the
fields for which the rule is applicable. If the alias name alias :
is omitted from this part of the rules, then DefaultFields is
assumed.The sequence of tokens that define how a particular type of address
is to be recognized is the before-address-pattern portion
of the rules definition. The sequence of tokens that define how the
address is to appear after the address has been rewritten is the after-address-pattern portion
of the rules definition. The following example is the rule for converting
host names:
A '@' NJEHostName => A '@' TCPHostName; -- convert host names
In
the previous example, A '@' NJEHostName is the before-address-pattern portion
of this rule, and A '@' TCPHostName is the after-address-pattern portion.
This rule specifies that the address to be rewritten has an arbitrary
local name (A), an at sign (@), and the NJE host name (NJEHostName)
of the current site. The rule also specifies that the rewritten address
must contain the same arbitrary local name (A), an at sign,
and the current site’s TCP host name TCPHostName.