Alias database format
In early versions of the MTA, the format of the alias database was an on-disk database, built using the
imsimta crdb utility based upon a flat text file input. Alternatively, new in the 8.0 release, the MTA supports use of memcache for certain database/storage uses, including the alias database; see the
alias_database_url MTA option.
Indeed, the alias database can be considered to have the same format as the optional domain database file. The allowed format of the flat text input file is normally:
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
key, that is, the alias, is limited to 32 characters in length and can translate to a
value string containing at most 80 characters unless either a "long" or a "huge" database is used. See the
-huge_records switches of the
imsimta crdb utility for information on long databases, and on huge databases.
Length restrictions aside, alias database entries are handled in the same way as alias file entries and can be used in exactly the same way. Both multiple addresses and mailing list references are allowed. (Note that in long or huge alias databases, while the translation string may contain 256 or 1024 characters, respectively, any individual address appearing in the translation string is limited to at most 256 characters (252 characters in iMS 5.2 and earlier). The purpose of the longer translation string limit in such databases is to allow room for multiple comma-separated addresses, or for mailing list definitions that besides an "address", also contain additional named or positional parameters.)
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 alias database text input file.
The alias database, like the alias file, must be world readable.
The MTA alias database is created from an input text file (not from the alias file---from a different input text file) using the
imsimta crdb utility. The format of entries in the input file for
crdb should be:
alias1 alias-value1 alias2 alias-value2 . . . . . .
Note that unlike the aliases file, the entries in the alias database source text file normally do not use a colon to separate the alias from its value.
Use the commands
# imsimta crdb input-file-spec IMTA_DATAROOT:db/aliasesdb-tmp # imsimta renamedb IMTA_DATAROOT:db/aliasesdb-tmp IMTA_DATAROOT:db/aliasesdb
An intermediate, temporary database is used so as to minimize any window of time during which the database file is in an undefined state as it is being generated or regenerated. (Note that the "symbolic" name IMTA_ROOT can be used in such a command.)
Alternatively, a source file using colons, (that is, of the same format as the alias file), e.g.,
alias1: alias-value1 alias2: alias-value2 . . . . . .
may be used providing that the
-strip_colons switch is used when building the database; e.g., on UNIX:
# imsimta crdb -strip_colons input-file-spec IMTA_DATAROOT:db/aliasesdb-tmp # imsimta renamedb IMTA_DATAROOT:db/aliasesdb-tmp IMTA_DATAROOT:db/aliasesdb