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.

This is a problem about maintaining an all-email VPS server.
First, I have two VPS hosts right now, both running CentOS 6.5, 32bit system. one for web hosting and other for email only.

The reason for that is, since I have many sites, I want the web hosting environment to be completely isolated from the email.

So, I added A record for my domains in this order.

198.551.224.10     www.my-site.tld        # Pointing to my web host IP
198.551.224.10     my-site.tld            # Pointing to my web host IP
198.551.224.11     mail.my-site.tld       # Pointing to my mail host IP

The problem with this approach is that, every email created now will have a prefix of mail before it, like joe@mai.my-site.tld so, I was thinking of changing the above configuration to this:

   198.551.224.10     www.my-site.tld        # Pointing to my web host IP
   198.551.224.10     my-site.tld            # Pointing to my web host IP
   198.551.224.10     mail.my-site.tld       # Pointing to my mail host

This way, all addresses are pointing to the same IP, and then somehow tell nginx to redirect any information coming from server mail.my-site.tld to IP 198.551.224.11 (the EMAIL server)

The problem is telling Nginx to redirect the request, yet if anyone has any better information about how to keep an separate email server while retaining that standard email format ex: name@domain.tld

share|improve this question

closed as off-topic by Wesley, Ward, Rex, mdpc, Tom O'Connor Apr 22 at 9:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Wesley, Ward, Rex, Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 0 down vote accepted

The A record will not impact your emails as long as you setup the correct MX record. If you want to receive emails for @example.com, you can setup your zone this way:

mail 3600 IN A 198.551.224.11
@ 3600 IN MX mail.example.com.
share|improve this answer
    
Thanks for the response but I don't have as much filed to type in the that setting. Here is a snap show of my config field i2.minus.com/j9O2eErEu4Qn3.jpg and thanks for clarifying about the MX field. –  iOi Apr 18 at 13:14
    
@iOi For the MX record, you leave the zone empty and you put the name to your mail server in the value field. –  Spack Apr 18 at 13:18
    
Ok, I left zone empty, and added mail for the value field (first blank field). I am a little embarrassed to say though, what happens now? I am assuming this will redirect request to my mail server, and user@domain.tld will be able to read/accept emails? –  iOi Apr 18 at 13:23
    
When a mail server is sending a message, it looks for the MX record. In your case the reply will send them to ``mail.domain.tld` which what you want to achieve. –  Spack Apr 18 at 13:26
    
Thanks. I am assuming I have a lot of work to do from here, but I will try. Thunderbird does not seem to detect any account I created using the mail.domain.tld maybe it takes time for this record to propogate –  iOi Apr 18 at 13:35

Aside from the MX settings, you may also need to configure your mail server to use your my-site.tld as its default domain. If using Postfix then look at the mydomain setting and the ones around it. CentOS comments the file good for that stuff.

share|improve this answer
    
Thanks @GeneBean, I that may be my current problem. I have mentioned it here I can't upvote your question since I am low rep, and got suspended after asking that question weird enough. I will try to ask more detailed question with my old account if possible and ping you in –  iOi Apr 18 at 14:31
    
can you take a look at this question serverfault.com/questions/589953/… –  iOi Apr 18 at 14:41

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