Address Rewrite Example

The example in this section takes a mail message and tracks it through the rewrite rules.

  1. A mail message arrives for jdoe@eng.company.com.
  2. The imta.cnf file is scanned to find a match for the domain part of the address. If it matches any of the rules in the first rewrite rule section (rules to select local user or l channel), the user is looked up in the alias database. In this example the address domain part matches rule four in the first section of rewrite rules.
  3. The alias cache is searched for the jdoe entry. The imta.cnf file is again scanned to find a match with the domain part of the address returned by the alias database search.
  The address may be returned as one of the following:
  If the address returned is jdoe@sims-ms.myhost.eng.company.com, the domain part matches a rule whose routing system is that of the message store channel. The message is then queued to the sims-ms channel and delivered to the store by the channel's master program.
  If the address returned is jdoe@myhost.eng.company.com, the domain part matches a rule in the l channel section. If the address matches the address previously looked up in the alias table, the destination channel is set to l (/var/mail) and the message is enqueued. If it does not match, the same operation is reiterated until it stabilizes on one address, the limit of the alias lookup is reached, or a self reference (a:b, b:c, c:a) is found. In the last two cases, the address is not resolved, which causes the messages to be bounced (unknown user error message). The alias lookup default is 10. This value can be changed by configuring the MAX_ALIAS_LEVELS option in the option file.
  If the address returned is jdoe@host2.eng.company.com, the domain part matches a rule in the Intranet SMTP channel section and the message is enqueued to the tcp_local channel (intranet channel) and so on.
  If the string jdoe does not match anything in the alias cache, the message is returned to the originator with the "user unknown" error.



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