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.

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.

1 answer


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


Submit an Answer