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.

Is it possible to create email addresses like these:

  • user1@john.mydomain.com
  • user1@mary.mydomain.com
  • user1@smith.mydomain.com

and have them all handled by one mail server, as three different mail boxes?

(Many examples I've seen talk about directing mail to user2@jones.mydomain.com into the same mail box as user2@mydomain.com - but this is not what I'm looking for.)

I haven't specified the server technology being used because I'm wondering if this is generally possible. If you know that server x can do this, please mention it in your answer!

Is it correct that MX records can be set to direct email to all subdomains *.mydomain.com to one mail server? Is that still true if there are also web sites at those subdomains (using A records)?

Thanks!

share|improve this question

2 Answers 2

Sendmail can do this with the virtusertable feature. You'd create a virtusertable like so:

james@domain1.com        X
james@domain2.com        Y
james@domain3.com        Z

I've opened the sendmail can of worms but I don't want to eat them. If you don't already know how to configure sendmail then you shouldn't attempt this.

As for the DNS question once you have any type of record for A.X.com then no wildcard will be consulted for any other type of record for A.X.com. Thus having an A record for a domain will prevent wildcard records from being used for the MX. This is documented in RFC 1034 section 4.3.3.

share|improve this answer
    
Thanks embobo... what does this mean? I don't have to use a wildcard record if I don't need to. Would I still need to create MX records for A.X.com? –  Glen Little Jan 9 '11 at 17:10
    
It means your wildcard MX for *.mydomain.com won't be applied to john.mydomain.com if you create an A record for it. You would need to create an MX for john.mydomain.com. –  Mark Wagner Jan 10 '11 at 18:06

I use Google Apps Gmail, and we have several domains linked to the same mailboxes. For instance:

  james@domain1.com
  james@domain2.com
  james@domain3.com

All of these are aliases for my mailbox. Google Apps also makes this really easy to setup through their Apps for your Domain panel. If it works for domain1.com and domain2.com, I don't see why it wouldn't work for subdomains as well like a.domain1.com and b.domain1.com, but it may involve making changes to your MX records.

share|improve this answer
    
Glen explicitly stated that he wants them to go to three different mail boxes –  Mark Wagner Jan 7 '11 at 18:35
    
Ah, I missed that. –  jmort253 Jan 8 '11 at 5:30

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.