For cases where address forwardings need to be autoregistered, or other cases of source specific forwarding, the MTA'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
use_forward_database MTA option.
Forward database lookups are performed after address rewriting and after alias expansion is performed, and after any
FORWARD mapping is checked. If a forward database lookup succeeds, the resulting substituted address is then run through the MTA's address rewriting process all over again.
The forward database is traditionally an MTA
crdb database, created using the
imsimta crdb utility from a source text file. However, nowadays the
crdb step is typically omitted by using an MTA so-called "text database": with the relevant bit (bit 2/value 4) of the
use_text_databases 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
forward_database_url 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
use_forward_database MTA option, then the source text file format expected is:
For instance, suppose a
tcp_snads channel receives messages from a gateway to a SNADS system that provides (and can use) only shortform hostnames. Then an entry such as
would allow the Bobby@BLUE SNADS user to send to a SNADS address of 12345678@MSMTA when they wish to send to email@example.com.