The following steps apply to the application of the domain rewriting rules to a given address:
1. | The first host or domain specification is extracted from an address. An address may specify more than one host or domain name as in the case: jdoe%hostname@alpha.com. |
|
2. | After identifying the first host or domain name, a search is conducted that scans for a rewrite rule whose pattern matches the host/domain name. | |
3. | When the matching rewrite rule is found, the address is rewritten according to the template portion of that rule. The template also specifies the name of a routing system to which messages sent to this address are routed. (In this case, the term "routing system" does not necessarily mean the name of a system through which the message is routed, but rather a tag associated with a specific channel.) | |
4. | Finally, the routing system name is compared with the host names that are associated with each channel. If a match is found, the message is enqueued to that channel; otherwise, the rewriting process fails. If the matching channel is the local channel, some additional rewriting of the address may take place by looking up the aliases database because the local channel rules are used to identify any local users as well as any /var/mail users. |
Note - Using a routing system that does not belong to any existing channel will cause messages whose addresses match this rule to be bounced. That is, it makes matching messages non-routable.