Alias_domains MTA Option
From MsgServerDocWiki
Domains in alias lookups (alias_domains)
This option takes a bit encoded integer argument controlling the format of alias file and alias database lookups. (This option does not affect alias_urln lookups.) The default value is 1, meaning that alias file and alias database lookups probe with only the local part (mailbox portion) of the address. Note that for addresses matching the local channel, such a 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 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. 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 * local part plus the domain name, and finally probe with just the local part.
| Bit | Value | Usage |
|---|---|---|
| 0 | 1 | Look up localpart. Clearing this bit disables the lookup of local parts only for channels other than the local channel; for the local channel, local parts 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 keyword, it is possible to cause addresses matching other channels to be checked against the alias file and alias database. Note that the effect of bit 2 (value 4), that is, the probes with * character username, can be controlled on a per-channel basis via the aliaswild channel keyword.
See also: aliaslocal channel keyword, aliaswild channel keyword, Alias file, Alias database, Aliases and forwarding, Alias and address options, alias_urln options, Subaddresses, MTA options, Option value syntax, Getting option changes to take effect, MTA options, listed alphabetically, MTA options, listed by functional groups, Alias and address options, Database options.

