Email DNS Configuration


I try to make an custom email with a domain name and postfix on my own server. I looked some tutorials but i don’t understand how it works. I know how to point a domain or subdomain to a server but i don’t understand the logic of DNS mail config. So how to configure correctly the DNS Domain with MX, IMAP, POP3 etc… What must to link to the IP address ? I already installed the webmail rainloop with subdomain on it.

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.


I hope you’ve managed to configure this.

MX record - this needs to be pointed to the IP address of your server You can create two CNAME records:

and point them to the IP of the server as well. You will need to chose one of those to use. Usually IMAP is used due to the fact you can access your email account from multiple devices.

You need to check the postfix configuration on your server and see the ports of IMAP/POP3 and SMTP in order to configure your mail client.

IMAP ports:
Secure (SSL) 993
Non-Encrypted 143

POP3 ports:
Secure (SSL) 995
Non-Encrypted 110

SMTP ports:
Secure (SSL) 465
Non-Encrypted 25