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 mail.work.com and I did it. I also made an A record for the mail.work.com witch is pointing to actual mail server with internal IP address, like 192.168.x.xxx . 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!)


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.

  • What if I make it only one server, not a separate one? Sorry have no reputation to vote your answer. Thank you 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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