I've got a co.uk domain set up in Server Admin on an OS X Lion server for mail - it's all running fine. I'd like to also set up a .com domain to run through the same mail server. Is this possible? If so can someone give me details on how to set it up - without losing the .co.uk domain?
Assuming you want the domains to be synonymous (e.g. email@example.com and firstname.lastname@example.org both correspond to the same mailbox), it's pretty easy. The trick is that the relevant configuration option is available in Server Admin.app but not Server.app. To get Server Admin, install the server admin tools (v10.7.4 is here, be sure to get the version matching what you're installing on), then open /Applications/Server/Server Admin.
In Server Admin, connect to the server (if it doesn't autoconnect), then select the server name in the sidebar -> Settings in the toolbar -> Services tab -> enable the Mail service and click Save in the bottom right (note: the Save button doesn't highlight very clearly when there are settings that need saving; just get in the habit of clicking it after doing anything).
Once the Mail service is enabled, it should appear in the sidebar (although you may need to click the disclose triangle next to the server name). Select Mail in the sidebar -> Settings in the toolbar -> Advanced tab -> Hosting subtab -> add the additional domain(s) to the "Local Host Aliases" list.
Note: this configures the server to accept mail for additional domain(s). In order for this to do anything useful, you also need to add MX records to DNS for the additional domain(s), so other servers know to deliver the mail to your server.
EDIT: to handle non-synonymous ("virtual") domains, go to Server Admin -> Mail -> Settings -> Advanced -> Hosting, enable virtual hosting, and add the domain(s) to the "Locally Hosted Virtual Domains" list. Then, add aliases to your user accounts for their virtual email addresses. You can add aliases either in Server.app (right-click on a user account and choose Advanced Options), or in Workgroup Manager by adding aliases to the Short Names list.
For example, if you had domain.com as your primary domain, domain.co.uk as a host alias, and otherdomain.co.uk as a virtual domain, and your account was "richard", you would be reachable as email@example.com and firstname.lastname@example.org, but would have no address at otherdomain.co.uk. If you added "email@example.com" as an alias for your account, you'd then also be reachable at that address (but not at firstname.lastname@example.org or email@example.com).
Note: you can also add aliases in the file /etc/aliases (e.g. add the line "firstname.lastname@example.org: richard" to get the effect I described above). If you do this, run
protected by Community♦ Apr 10 at 16:32
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.