Alias_domains MTA option

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



Domains in alias lookups (alias_domains)

The alias_domains MTA option takes a bit encoded integer argument controlling the format of alias file (and hence in Unified Configuration alias option) and alias database lookups. (This option does not affect alias_urlN lookups.)

As of Messaging Server 7.0-3.01, the default value of alias_domains is 6, meaning that alias file and alias database lookups probe first with the entire address, then probe with a wildcarded localpart plus domain, and finally addresses matching the local channel probe with solely the localpart; previously, the default value had been 1, meaning that alias file and alias database lookups would probe with only the localpart (mailbox portion) of the address. Note that for addresses matching the local channel, the a localpart-only probe is made even if bit 0 (value 1) is not set. Setting bit 1 (value 2) causes a probe to be made using the entire address (including the domain name). Setting bit 2 (value 4) when bit 1 (value 2) is also set causes an additional, fall-through wildcard * probe -- effectively a "domain catchall address" probe -- to be made. Indeed, if the address included a subaddress, setting bit 2 (value 4) causes two wildcard * probes to be made, first *+*@domain-name and then *@domain-name. (For wildcarding solely the subaddress, not the localpart, see the subaddresswild channel option.) If all bits are set, i.e., alias_domains=7, then the order of the probes is to first probe with the entire address (the most specific check), next probe with a wildcard * localpart plus the domain name, and finally probe with just the localpart.

alias_domains MTA option bit values
Bit Value Usage
0 1 Look up localpart. Clearing this bit disables the lookup of unadorned localparts for channels other than the local channel; for the local channel, localparts are always looked up.
1 2 Look up localpart@domainname.
2 4 If performing entire address probes (that is, if bit 1 is also set) and if no exact match was found, try lookups with the * character for the username; more precisely, an *+*@domainname (if the address included a subaddress), and an *@domainname lookup.

Bit 0 is the least significant bit.


Note that by default only addresses rewritten to the local channel are checked against the  alias file and  alias database.  However, via use of the  aliaslocal channel option, it is possible to cause addresses matching other channels to be checked against the alias file and alias database for aliases, at which point alias_domains can affect aliasing of addresses rewriting to those other channels.  Note that the effect of bit 2 (value 4), that is, the probes with the * character as the localpart, can be controlled on a per-channel basis via the aliaswild channel option. 


See also: