Domain database

From Messaging Server Technical Reference Wiki
Jump to: navigation, search


The MTA's domain database, seldom used nowadays, provided an alternate location for storing rewrite rules, for cases of exceptionally large numbers of rewrite rules.

In early versions of the MTA, the format of the domain database was an on-disk database, built using the imsimta crdb utility based upon a flat text file input. The allowed format of the flat text input file is:

key value

one entry per line, with the key beginning in column one, one or more white space (SP or TAB) characters, and then the value on the right hand side.

The comment_chars MTA option controls which characters (by default exclamation point and semicolon) in column one of a line are considered to indicate a comment line. The left angle character may be used to read another file into the domain database text input file.

For a crdb "on disk" database, the left hand side (the key) cannot contain spaces or tabs unless the -quoted switch is used; the maximum length of the key and value depend upon whether the -long_records switch is used.

New in the 8.0 release, the MTA supports use of memcache for certain database/storage uses, including the domain database; see the domain_database_url MTA option.

The use_domain_database MTA option controls whether or not the MTA makes use of the domain database. In MS 7.2 and earlier, the default for use_domain_database was 1, so the mere presence of the domain database file was enough to activate this database facility in the MTA. As of MS 7.3, the default for use_domain_database changed to 0 from the prior default of 1, so as of MS 7.3 it is necessary to explicitly set use_domain_database=1 (and then if using a compiled configuration, recompile the configuration), and restart any long-running processes (e.g., SMTP server processes) to enable consultation of the domain database. Note that the domain database is consulted only when no match was found among the rules in the rewrite group (Unified Configuration) or the configuration file (legacy configuration). That is, the domain database is only consulted if a given rule is not found in the rewrite group or configuration file, so rules can always be added to override those in the database.


See also: