Postfix + Dovecot: Multiple IP's and domains

Hello All…

I am about to setup my Linode with multiple domains for email on multiple IP's and have a few questions.

I have SSL certs for each of the domains and know how to apply them in the configs for Dovecot and Postfix. The issue I want to understand better is the hostname of the system and how it relates to the these daemons.

When I setup the mail client, it looks at the SSL cert and compares it to the system name. Is it possible to setup the Linode (Ubuntu) to have for example:

IP aaa.bbb.ccc.ddd = mail.example.com

IP fff.ggg.hhh.iii = mail.example2.com

IP lll.mmm.nnn.ooo = mail.example3.com

This way, the client will not report a mismatch in the certificate.

Thanks..!!!

2 Replies

You are looking at SNI support by postfix. Or you may run multiple postfix processes, one per IP address.

But, it is better to run one name (your server name) as your MX, it solves a ton of problems and the configuration is easier. For example, if you create a linode server with the name example.tld, then you can just declare the MX for all your domains to be example.tld and you only need to setup postfix once and it will be a simple setup.

If you are trying to hide the domains from each other, or their hosting node, then your idea is wrong. Hosting multiple domains, even with separate IP addresses does NOT hide anything. It is still very easy to figure out the hosting node and the "related" domains. So you are not gaining anything, you are just making yourself work a lot more to configure everything.

I'm using this script with centos 7 and postfix, it generates all the proper configuration files automatically (virtual hosts + parked domains, etc), you can see the template configuration for postfix here.

You can proxy it through Nginx (or an alternative): https://www.nginx.com/resources/admin-guide/mail-proxy/

Or just use one master name as the mail name. e.g mailstore.com (for everyone). Vanity frequently gets in the way of this solution.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct