Forward database

For cases where address forwardings need to be autoregistered, or other cases of source specific forwarding, the MTA&#x27;s forward database is available. Note that use of the forward database for simple forwarding of messages is generally not  appropriate: if a database must be used, then the  alias database is more  efficient for straightforward forwarding; or if  users are provisioned in LDAP, then forwarding can be handled via normal LDAP attributes. So by default, the forward database is not used at all; its use must  be explicitly enabled via the     MTA option.

Forward database lookups are performed after address rewriting and after alias expansion is performed, and after any    mapping  is checked. If a forward database lookup succeeds, the resulting substituted address is then run through the MTA&#x27;s address  rewriting process all over again.

The forward database is traditionally an MTA  database,  created using the   utility  from a source text file. However, nowadays the  step is typically omitted by using an MTA so-called "text database": with the relevant bit (bit 2/value 4)  of the   MTA option set, then the MTA will compile the source text file directly into its configuration. Or new in MS 8.0, the forward "database" can be stored in memcache; seethe  MTA option. In either case, the format of the source text file by default is expected to be: user1@domain1   changedmailbox1@changeddomain1 user2@domain2   changedmailbox@changeddomain2 But if source specific use of the forward database has been enabled by setting bit 3 of the    MTA option, then the source text file format expected is: source-channel&#x7c;source-address&#x7c;original-address changed-address For instance, suppose a  channel receives messages from a gateway to a SNADS system that provides (and can use) only  shortform hostnames. Then an entry such as tcp_snads&#x7c;Bobby@BLUE&#x7c;12345678@MSMTA    user.with.a.long.name@else.where.com would allow the Bobby@BLUE SNADS user to send to a SNADS address of 12345678@MSMTA when they wish to send to  user.with.a.long.name@else.where.com.

See also:
 * Alias database
 * Forwarding via user LDAP attributes
 * use_forward_database MTA Option
 * forward_database_url MTA Option
 * FORWARD mapping table
 * Aliases
 * use_text_databases MTA Option
 * crdb utility
 * Forwarding mail