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 have two servers:

(A) - A VPS (Centos)

(B) - Amazon EC2 Instance (no connection to A) - (Ubuntu)

I'm having an issue of: not being able to receive email on (B), I recently switched my domain from A to B and setup my application on B, but now email is not working at all.

I looked into just having email on amazon cloud too, but it seems like it is too much of a pain and not worth the effort.

Question: Is there someway to have email on A and have B running the application with the domain pointed to B ? or is this technically infeasible?

share|improve this question

1 Answer 1

I'm having an issue of: not being able to receive email on (B), I recently switched my domain from A to B and setup my application on B, but now email is not working at all.

This can be done through DNS (http://en.wikipedia.org/wiki/Domain_Name_System). A DNS zone can have multiple record types (http://en.wikipedia.org/wiki/List_of_DNS_record_types). In order to host a domain on a particular server, a DNS will have 'A' record (and/or 'CNAME' record/s for sub-domain/s). To receive emails for a domain, a DNS would have 'MX' record. MX doesn't necessarily point to the same server that host the domain.

If you look at your DNS records, you'll see that both 'A' and 'MX' records point to the same server (in your case, server B). So, you probably need to point the MX record to the server A in the DNS. Ref: http://en.wikipedia.org/wiki/MX_record

Once, you did that, please wait for up to 48 hours for the DNS propagation to complete. Then, you will be able to receive emails on server A. Your application on server B can still be able to send any emails, assuming server B is configured correctly to send emails.

I hope that clarifies and helps!

share|improve this answer
    
Point the MX record on Server B to the Server A ? –  user700070 Oct 5 '13 at 3:53
    
Where do you host the DNS? –  Pothi Oct 5 '13 at 3:54
    
The DNS is on Server A –  user700070 Oct 5 '13 at 17:16
    
First off, thanks for the more in-depth explanation. I was slightly wrong. I cannot receive email, but I can send email to another account like gmail or something. Why can't I receive the mail if I send from gmail->mysite's email ? –  user700070 Oct 5 '13 at 17:38

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.