3.3. Multiple host names If your system is known by more than one name, e.g., all addresses of the form can also be written as or , then you need to tell qmail this so it'll know which addresses it should deliver locally and which messages it should accept from remote systems. To do this, just add all of the names to two control files: rcpthosts, which tells qmail.smtpd to accept mail addressed to these hosts, and · locals, which tells qmail.send that addresses on these hosts are to be delivered locally. · Send qmail.send a HUP (hangup) signal to tell it to reread locals. If you have qmailctl, you can do:
qmailctl reload
3.4. Virtual domains Virtual domains are similar to the multiple host names discussed in the previous section, but there are some important differences. First, if example.net hosts the virtual domain virtual.example.com, it's generally not true that messages sent to
should end up in the same mailbox as messages sent to The namespace for each virtual domain is distinct. With qmail, virtual domains are configured in the virtualdomains file, which consists of one or more entries of the form: user@domain:prepend qmail converts user@domain to prepend.user@domain and treats the result as if domain was local. The user@ part is optional. If it's omitted, the entry matches all @domain addresses. Returning to the example scenario above, if the example.net mail administrator wanted to create a virtual domain, virtual.example.com, under the administrative control of user john, the following entry in virtualdomains would accomplish that: virtual.example.com:john
An incoming message to would be rewritten as john. and delivered locally. See the .qmail section, and the extension addresses subsection for more information about how john can manage his virtual domain. As with multiple host names, all virtual domains must be listed in rcpthosts so qmail.smtpd will know to accept messages addressed to them.
!!! However, unlike multiple host names, virtualdomains must not be added to locals.
After modifying virtualdomains, send qmail.send a HUP (hangup) signal to tell it to reread the file. If you have qmailctl, you can do: