I currently have two domains, let’s call them domain.com and something.org.
I want to use both domains with mailcow. I understand that I must choose one main domain to use as the hostname, I’ve done that already. My question is about the certificates.
I’m managing all my domains with Cloudflare and I already have an nginx (NPM) instance running. I see I can use my own certificate but that only allows for one single cert, isn’t it? Since I have two domains I have two Let’s Encrypt certificates, so how would I use them?
I’m using mail.domain.com as the hostname but since I want to be able to use mail.something.org too I have to also add the cert for that domain, right?
I’m using DNS challenges because port 80 and 443 are used by Cloudflare pages, so I have to generate the cert using Cloudflare API keys. I could let mailcow generate the certs but:
- NPM doesn’t have an option to use external certificates
- I don’t see anywhere in the mailcow’s config file an option to use DNS challenges for the cert generation
The simplest way to solve this would be by using my own cert but the problem about only being able to use one certificate is stopping me from doing that.
The other option I can see is adding a custom cert to NPM and replace the NPM generated cert files with mailcow’s, but again, I don’t see how to do DNS challenges with mailcow.