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 recently tried to open a mail server for our company. For some reasons it was better to make mail server separate from other server(s) in data center, so we plugged another server to our local network and built up the mail server. As you can see in the picture, we have a DNS server to manage the domain and our only valid IP. The IP has set correctly and main website is up, but mail server is not.

Please have a look at this image:

enter image description here

I know that I should have MX records for the entire domain that points to mail server, for example and I did it. I also made an A record for the witch is pointing to actual mail server with internal IP address, like . Now it works in the local network itself, I can manage my inbox, sent items, and anything else expected by a mail server, the problem is, mail server is not accessible form the internet, and it's logical! Cause the A record, points to a local network machine, not a valid IP address. Now my question is, how can I make my mail server public on the internet? (I researched and got something like if you put a CName record with the A record it should work, is that true? I'm sorry I'm not a network master, but I've got to ask some one!)

share|improve this question
up vote 3 down vote accepted

Easiest solution: You will need an additional public IP address for this server and point the MX and A entries to this.

Just using a CNAME doesn't work because external systems can't still contact your mail server on it's private address.

Other options might be to use the web server as a mail gateway which forwards incoming mail to the actual mail server or setting up some kind of port forwarding, but I wouldn't recommend this and this depends heavily on your network topology and the systems used.

share|improve this answer
What if I make it only one server, not a separate one? Sorry have no reputation to vote your answer. Thank you – Mohsenr1 Jan 1 '13 at 6:38
It should work, but separating mail and web server is actually a good idea, as it is easier to scale out if necessary, among other reasons. – Sven Jan 1 '13 at 6:44

Your Answer


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.