second attempt at understanding:
a domain is either
local
hosted
relay
local domains are kept in the file locals, using the format
1) mydomain.com
2) .mydomain.com
the second representing all subdomains of mydomain.com
hosted domains are kept in the files or directory hosteddomains (if a
directory, its files are catenated together) using the format
1) mydomain.com
2) .mydomain.com
3) myalias.com<tab>mydomain.com
the third representing an alias, where myalias.com is rewritten as
mydomain.com.
all domains are kept in files in the esmtpacceptmailfor.dir, contains
all of the domains in locals and hosteddomains as well as domains for
which that instance of Courier will accept and relay mail (backup MX,
for example). the format is
1) mydomain.com
2) myalias.com
?) there is no .mydomain.com syntax
?) if the domain is specified, subdomains are also listened for
the primary difference between locals and hosteddomains is that the
domain does not need to be specified for locals - indeed, in aliases,
the domain cannot be specified, either in mail or maildrop, if the
domain is in locals.
locals is sync'd with makealiases;
hosteddomains is sync'd with makehosteddomains;
esmpthosteddomains is sync'd with makeacceptmailfor.