Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up Mac OS X Server (10.5 Leopard) for the first time. I will be configuring it to run multiple domains (or "virtual hosts" as they are called), and for each domain I want to set up a Web site and e-mail. I bought the Mac OS X Server Essentials (2nd ed.) book to use as a reference.

Let's say I want to host two domains: example.com and anotherexample.com. Looking at page 319, it shows how to enable e-mail accounts for users in the Workgroup Manager application. Looking at the screenshot, it seems to imply that all users will need to be referencing the same mail server, which I am guessing is the initial server name that I use to set up Mac OS X Server. So, if I want to setup an example.com e-mail address for Alice and an anotherexample.com e-mail address for Bob, and they ask what settings they need to put into their e-mail clients, do I tell them both to use the server "mail.example.com" -- even though for Bob, that will look wierd, since he doesn't have an e-mail address on that domain?

If it's true that all users need to be using the same mail server, regardless of what e-mail address they have, should I set up the Server software with some kind of "generic" domain -- perhaps "examplehosting.com" -- so it doesn't "look" so strange?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

There are two ways to set up multiple email domains on OS X Server: you can add aliases (which share the same account names, e.g. alice@example.com and alice@anotherexample.com go to the same mailbox) or virtual domains (which can have different accounts).

Adding alias domains is easy: in Server Admin -> Mail service -> Settings -> Advanced -> Hosting, add the additional domains to the Local Host Aliases list.

Virtual domains are a little more complicated. Add the virtual domain names in Server Admin -> Mail service -> Settings -> Advanced -> Hosting -> Locally Hosted Virtual Domains (and check the enable box). Then, to create users for this domain, create them as usual in Workgroup Manager, and add their full virtual alias as secondary short names (e.g. you might create a user with the primary short name "alice-otherexample", and a second short name of "alice@anotherexample.com"). Alice can then receive mail using an account name of either "alice-otherexample" or "alice@anotherexample.com". Note that users for the server's primary domain name (or its aliases) don't have to bother with these funny names, they just access their mailboxes by their usual shortname.

In either case, make sure you also set up the DNS properly; you need MX records for all domains you receive mail from, pointing to your server's hostname.

share|improve this answer
    
If Alice wants alice@example.com and Bob wants bob@anotherexample.com, they will need to configure their e-mail clients with a mail server name. What do I tell each of them to put for that setting? –  Shaggy Frog Sep 14 '10 at 3:26
    
Any DNS name that resolves to the server's IP address; the server never sees it, so it doesn't actually matter. If you want to make it neat, add a machine record for mail.example.com -> serverIP, and also an alias (cname) record for mail.otherexample.com -> mail.example.com, and then have Alice use mail.example.com and bob use mail.otherexample.com. –  Gordon Davisson Sep 14 '10 at 4:31
    
That makes sense. Okay, now let's say I want to set up Carol with both carol@example.com and carol@anotherexample.com. Looking at this screenshot (and that's all I'm going on so far -- I haven't set this up yet because I want to get it right the first time), I have to find Carol's name in the list in Workgroup Manager, and then assign her a mail server. What would I put in for the mail server? A numeric IP? Or a FQDN? Which one? –  Shaggy Frog Sep 14 '10 at 5:20
    
In that case you'd give carol 2 short names: "carol" and "carol@otherexample.com", and set her Mail Server (under the Mail tab in WGM) to whatever the server's hostname is (i.e. the one shown in SA -> Mail -> Settings -> General). The "Mail Server" field needn't have anything to do with the mail address she uses, it's so the server can determine if it's in charge of that user's mailbox (this important if you have several servers, and need to control where each users mailbox lives). –  Gordon Davisson Sep 14 '10 at 6:21
    
In that case, does it make sense to have a "generic" domain name for the server doing the hosting, a kind of "umbrella" name like "examplehosting.com"? Or is that purely an aesthetic concern? –  Shaggy Frog Sep 14 '10 at 6:25

While it is not impossible to host more than one mail domain with MacOS X, it is difficulty to achieve without knowledge because all the graphical administration tools allow for the configuration of only one mail domain. Don't confuse this with the hosting of more than one domain for the web server, which is trivially easy to set up.

To configure hosting for more mail than one domain with basic MacOS server (without third party software like Zimbra or Kerio) you will need to edit your postfix configuration by hand and will have to figure out how to connect this to Open Directory to interact with your user database.

I am not really sure if MacOS X server is the right tool for what you want to do. It is great as a file server and directory server if you have many Apple clients, but everything else (Mail, Web, Groupware) is definitely targeted at small companies without many needs (say small creative agencies etc.). Since Apple mostly uses standard unix tools and just sugarcoats them with a nice GUI, you can actually do quite a lot with the system if you configure it manually but that will require quite a bit of knowledge, not least because you will have to fight many Apple idiosyncrasies along the way.

share|improve this answer
1  
Apple's GUI tools can handle this fine; you don't have to fiddle with the config files if you don't want to. –  Gordon Davisson Sep 14 '10 at 2:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.