How to setup email for multiple domains on single server?
I have successfully set up an email server with a single domain www.mydomain.com using the Email with Postfix, Dovecot, and MySQL guide. The email address that I am using with this server is [email protected] Now, I want to add an email address for a completely different domain with seperate certs from letsencrypt. My second domain is www.myseconddomain.org. I want to set up an email address of email@example.com on the same server. Initially, i thought this would be as easy as creating a new database in mysql and adding it to postfix/dovecot. However, one of the major issues that I can't figure out, is that when specifying the certificate path in dovecot/postfix, there is only one place for one single certificate. So I can't add a certificate for mydomain.com as well as myseconddomain.org. Is there a way to easily do this? If not, how would I go about getting started creating multiple email servers for different domains on a single server instance? Any help in getting started would be much appreciated!
I did some research on this for you, and I've found some resources that might be able to help you out.
This first Stack Exchange link will give you a couple of different sets of directions - for using the same MX records for each domain so that additional SSL certificates aren't needed, and also for using separate SSLs on Postfix 3.4:
Here's another Stack Exchange page that discusses it a bit more, suggesting that you can use certs with multiple SANs: