home *** CD-ROM | disk | FTP | other *** search
- The internal canonical form used in the IDA/NIU Sendmail.mc.
- -----------------------------------------------------------
-
- The internal representation of an address is a modified source route,
- changed so as to provide a completely linear route.
-
- Thus a source route <@a,@b:user@c>
- is converted to:
- @a,@b,@c,user
-
- Notice how the modified source route is a completely linear description
- of the sequence of delivery steps.
-
- We further extend this format by allowing the separation character to be
- any of ',' ':' or '!'. The ',' is used for domains delimited by an '@'. The
- ':' is used as a separator for domains delimited by a '%'. The '!' is the
- separator for domains delimited by a '!'.
-
- Thus an address: 'a!b!c!user' becomes '@a!@b!@c!user', while address
- 'user%b@a' becomes '@a,@b:user'.
-
- The address is then further canonicalized by enclosing the immediate
- domain in <angle brackets>. Thus a hybrid address 'b!c!x@a' for which the '@'
- has precedence is ultimately formatted into: '<@a>,@b!@c!x'. (However the
- initial '@' in the angle brackets may on occasion be changed to a '%' as
- a flag which indicates that this is a sender address rather than a recipient
- address).
-
- ALGORITHMS.
- ----------
-
- The basic idea is that the output address format can be completely set
- while retaining the internal canonical form, by merely changing the
- delimiters ',', ':', or '!'. The address need not be turned back into
- external form until the final pass through ruleset 4 (except when used
- as a dbm search argument).
-
- Classes: CX is '@' and '%' as before. But CY is changed to '!',',' or ':'.
- CA is '@' in a class by itself as before.
-
- Searching for a domain in the address uses the argument:
- @$+$=Y
- Searching for the user portion uses the search argument:
- $=Y$~A$* (with the last two matching the user).
-
- Canonicalization is done in ruleset #7 (and its subroutine #9) called
- from ruleset #3. Ruleset #9 is designed to recognize the user portion
- of an address. However in a mixed @/%/! address, the user portion may
- itself be a %-path or a !-path. So rule set #9 canonicalizes any path
- in the user portion, which it encloses in <angle brackets> to separate
- it from the rest of the address. Rule set #7 calls #9 to select the
- <user portion>, then canonicalizes the address treating the <user portion>
- as a unit. Then it removes the <angle brackets> to merge the possible
- two routes. Finally it places <angle brackets> around the immediate
- host. A local user address (without host) is represented as '<>,user'
- to indicate a null host. (Rule set #3 later changes a local user
- to '<>,@local-host-name,user' to provide a default host name). The
- ability to ruleset #7 to combine two routes is also used in the
- pathalias lookup (ruleset #22).
-
- Ruleset #4, which converts an internal address to external form, is
- in principle the reverse of the above. Initially the complete address
- is enclosed in <angle brackets>. Then the idea is to logically look at
- what is in <angle brackets> and change it by pulling out the primary
- domain in the appropriate external format. This recursive procedure doesn't
- quite work because of the complexity of the source route format, but still
- forms the idea behind ruleset #4.
- The unqualification of UUCP nodes with uucpxtable is done in ruleset #4
- as part of the formatting process. This allows the full domain named to
- be retained internally for as long as possible. (However decnetxtable is
- not handled in ruleset #4).
-