Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to segregate email address of my employees according to the geographic location. so i have thought of creating email with location information as abc@in.domain.com or xyz@us.domain.com etc

current setup: email hosting from 2 different service providers (godaddy and google apps) , one domain having hosting at godaddy, all current users email is on godaddy.

want to be achieve: set of new users will have email account like abc@in.domain.com etc.

Problem is: what should be done to have just us.domain.com should go to apps. As for how can i assign different MX record just for subdomain. for the same i have also purchased different email hosting space also.

I have tried to explain it. Let me know if some more information is required on the same.

Thanku

share|improve this question

migrated from stackoverflow.com Oct 11 '10 at 14:10

This question came from our site for professional and enthusiast programmers.

Its probably really bad practice to have email addresses with subdomains in them. For one, it could cause errors with your users registering for site's with the new email address. Could lead to validation errors, typos, and build lots of headaches.

Your smartest bet is to invest in multiple domains user@yourcompany.com and user@yourcompany.co.uk

You can have all your folks on one domain, as a third option. You could use two email servers or just setup email forwarding from google apps to godaddy for the ones that will stay on with godaddy.

Here is how you do it for your scenario (the one described above)

Make an A record for each domain. us.company.com - 127.0.0.1 (use your ip) in.company.com - 127.0.0.1 (use your ip)

Then id make two more a records mail.us.company.com (ip of godaddy mail server) mail.in.company.com (ip of your mail server)

Then you make your mx records The mx records will be. us.company.com going to mail.us.company.com with priority of 10 in.company.com going to mail.in.company.com with priority of 10

Again the above approach is not the cleanest way of doing things, and can lead to problems with some mail servers, scripts, sites, ect.

Best of luck.

PS. if godaddy does not allow you to setup DNS records the way you want, try Zerigo DNS they are great. And for a GREAT alternative to google email apps check out Rackspace hosted apps. They have AMAZING Support. I use them for Both exchange email and standard pop email at my domain and could not stop recommending them!!!

Here is the above sample for Zerigo with the domain name Pickle.com

us.pickle.com MX 10 15 minutes
edit clone delete

mail.us.pickle.com mail.us.pickle.com A 15 minutes
edit clone delete

127.0.0.1 mail.in.pickle.com A 15 minutes
edit clone delete

127.0.0.1 in.pickle.com A 15 minutes
edit clone delete

127.0.0.1 us.pickle.com A 15 minutes
edit clone delete

127.0.0.1

share|improve this answer
    
I can only agree with Frank. It's a bad idea, but it's real easy to do so if GoDaddy are making it difficult then ditch them and get a reputable provider. – RobM Oct 12 '10 at 8:59

I do not agree that this is a bad idea, it's no different from any other complex domain name.

However, you will need to have multiple DNS zones which would be operating system dependent. I was able to successfully achieve this on a VPS running cPanel using the following steps:

Have a control panel for each subdomain (these do not need to be on the same server.)

Configure the DNS zone in each control panel to have the desired MX records, treating the subdomain like naked domains.

From the DNS zone for the naked domain, direct traffic to the control panel of each subdomain with an A record. When the control panel is reached via the parent DNS, the MX records from the DNS zone will take effect.

Example:

http://leafdns.com/index.cgi?testid=AC03953F&lock

http://leafdns.com/index.cgi?testid=57AEFA55&lock

Edit:

After further testing, in cPanel, additional cPanel accounts are not necessary. cPanel allows you to edit the MX records for subdomains on the same cPanel independently, though they do not have any MX records (From the MX Entry icon) by default. However, the above instructions may be useful for other control panels that do not allow this.

share|improve this answer

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.