Step by step instruction for configuring dns records for email server.

Posted March 10, 2017 8.7k views
EmailDNSUbuntu 16.04

Please provide step by step instructions for setting up dns records for an email server. The tutorial says create a mx record, but not where or how to create it. Other tutorials give conflicting information. Such as “create a mx record at your registrar”, the tutorial on dns says to point the mx record at the gmail servers, but I want to host my own email. I tried the modoboa setup that someone else suggested, but it was awful. Horrible software. I just want to send and receive emails and be able to use webmail. (because console email is not useful for attachments) I need for my website users to be able to have their own account too, and I’m not going to have them using a console.

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.

Submit an Answer
2 answers

You create your MX record wherever your domains nameservers are and you point them to your droplet IP.

  • Ok, so I have on one droplet, and the mail server on a separate droplet. do I create the mx record on the droplet or the droplet?

    what does the mx record point to? the droplet? or the droplet?

    I read the article about “why you should probably not host your own email server”, I get that it is complex and challenging. But it feels like cheating to not learn how to!

    So help a novice out. I need details. Thank you.

Maybe you should understand first is the domain name record and Droplet are two things.
Your domain name added to DigitalOcean Domians is independent of your Droplet, you can create the relationship with a sub-domain to a service on your Droplet. For example, you have added a domian name ‘’ to DO’s Domains. you can create an 'A’ record with name 'www’ and point to your IP address '’ of Droplet(A), now the sub-domian ’’ is related with the Droplet. The same way, you can add another 'A’ record with name 'images’ to point to your Droplet(B) which IP address is '’, let the '’ is related with the Droplet(B).

The domain name has nothing to do with droplet before you add dns records.