Shared Domains with System Accounts

Accepting mail for multiple domains where every user can receive mail for every domain is the simplest configuration of virtual domains. Simply add your virtual domains to the mydestination parameter. Create user accounts as you normally would, and they can start receiving mail addressed to any of the domains. This technique uses the local delivery agent, providing all of the same features as your normal canonical domain hosting. Users can create their own .forward files, and local aliases are available. On a system whose canonical name is, hosting two virtual domains, and, the mydomain parameter is set as if were the only domain, and mydestination is set as follows:

mydomain =
mydestination = $myhostname, $mydomain,,

Make sure you reload Postfix after making changes. Users can now receive mail at any of the domains you listed in mydestination:

# postfix reload

Messages addressed to either or all go to the same local user account.



Postfix Architecture

General Configuration and Administration

Queue Management

Email and DNS

Local Delivery and POP/IMAP

Hosting Multiple Domains

Mail Relaying

Mailing Lists

Blocking Unsolicited Bulk Email

SASL Authentication

Transport Layer Security

Content Filtering

External Databases

Appendix A. Configuration Parameters

Appendix B. Postfix Commands

Appendix C. Compiling and Installing Postfix

Appendix D. Frequently Asked Questions

Postfix(c) The Definitive Guide
Postfix: The Definitive Guide
ISBN: 0596002122
EAN: 2147483647
Year: 2006
Pages: 130
Authors: Kyle Dent D. © 2008-2020.
If you may any questions please contact us: