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 info@mydomain.com. 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 info@myseconddomain.org 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!

2 Replies

Linode Staff

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:

Postfix, multi domains and multi certs on one IP

Here's another Stack Exchange page that discusses it a bit more, suggesting that you can use certs with multiple SANs:

Set up certs for multiple domains in Postfix and Dovecot

Thank you! I am still having trouble and will post more when I figure some things out!

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