Question

Setup web and mail server on 2 different droplets

I have already setup nginx web server on a droplet and it’s running fine. I have also setup mydomain.com to point to the droplet (Droplet A).

Now I would like to run a mail server on a separate droplet (Droplet B). How to configure the DNS / MX records so that Droplet B receive mail for mydomain.com while droplet A serves the web?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Just setup postfix (and dovecot if you wish to connect with a mail client) on a new droplet, make sure its pointing to something like mail.example.com. Create an A record and call it mail.example.com and have the IP of your mail server be located there. Then create a MX record and have it be mail.example.com. <br> <br>If you want it to be simple, you could try iRedMail, but I would suggest learning how to set everything up by hand so you could get a good understanding how the software works. It is not hard at all :)