Semantics of rewriting rule sets

There are five rewriting sets that have specific semantics. Four of these are related as depicted by figure 1.

-->| 0 |-->resolved address
/ +---+
/ +---+ +---+
/ ---->| 1 |-->| S |--
+---+ / +---+ / +---+ +---+ \e +---+
addr-->| 3 |-->| D |-- --->| 4 |-->msg
+---+ +---+ \e +---+ +---+ / +---+
--->| 2 |-->| R |--
+---+ +---+


boxwid = 0.3i
boxht = 0.3i
movewid = 0.3i
moveht = 0.3i
linewid = 0.3i
lineht = 0.3i

box invis "addr"; arrow
Box3: box "3"
A1: arrow
BoxD: box "D"; line; L1: Here
C: [
C1: arrow; box "1"; arrow; box "S"; line; E1: Here
move to C1 down 0.5; right
C2: arrow; box "2"; arrow; box "R"; line; E2: Here
] with .w at L1 + (0.5, 0)
move to C.e right 0.5
L4: arrow; box "4"; arrow; box invis "msg"
line from L1 to C.C1
line from L1 to C.C2
line from C.E1 to L4
line from C.E2 to L4
move to BoxD.n up 0.6; right
Box0: arrow; box "0"
arrow; box invis "resolved address" width 1.3
line from 1/3 of the way between A1 and BoxD.w to Box0

Figure 1 -- Rewriting set semantics

D -- sender domain addition
S -- mailer-specific sender rewriting
R -- mailer-specific recipient rewriting

Ruleset three should turn the address into canonical form. This form should have the basic syntax:

Ruleset three is applied by sendmail before doing anything with any address.

If no @ sign is specified, then the host-domain-spec may be appended (box D in Figure 1) from the sender address (if the C flag is set in the mailer definition corresponding to the sending mailer).

Ruleset zero is applied after ruleset three to addresses that are going to actually specify recipients. It must resolve to a {mailer, host, user} triple. The mailer must be defined in the mailer definitions from the configuration file. The host is defined into the $h macro for use in the argv expansion of the specified mailer.

Rulesets one and two are applied to all sender and recipient addresses respectively. They are applied before any specification in the mailer definition. They must never resolve.

Ruleset four is applied to all addresses in the message. It is typically used to translate internal to external form.

[Contents] [Previous] [Next]

Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright 1999  All rights reserved.
Last modified: Friday April 02, 1999.