Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL certificates per Domain #246

Open
runout-at opened this issue Oct 29, 2017 · 4 comments
Open

SSL certificates per Domain #246

runout-at opened this issue Oct 29, 2017 · 4 comments

Comments

@runout-at
Copy link
Contributor

The idea is that we have different SSL certs. Eg. one per domain.
Normally i get my certificates with certbot from letsencrypt.
For some people it's confusing to see a certificate from a different domain on connecting to the mailserver.

I don't know if or how easily this could be done.
Let me know if you think this is completely stupid.

@Udera
Copy link
Collaborator

Udera commented Nov 25, 2017

Wouldn't you need a dedicated IP address for each certificate?

@Udera Udera added the question label Nov 25, 2017
@Udera
Copy link
Collaborator

Udera commented Dec 3, 2017

Do you know which clients work well with SNI? Other mail servers (workaround: you could use SNI only on port 587/465)?
https://wiki.dovecot.org/SSL/SNIClientSupport
https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/SSL_Certificates
http://postfix.1071664.n5.nabble.com/TLS-SNI-support-td72278.html

Since letsencrypt allow multidomain-certs, it's only a cosmetic thing if someone checks the certificate manually (how do you check the ssl cert in a mail application?). For browser access you could still use a subdomain (webmail.example.org) using SNI.

@runout-at
Copy link
Contributor Author

If the client is not sending an SNI hostname, then there is a 'fallback' to a certificate which has all hostnames in the SAN field. Or you could see it as a 'default' as long as the client doesn't send SNI.
This way there should be no problem with any client.
Mailservers (on port 25) normally don't send SNI - the only SNI i saw was from google.
(I'm running this setup on my production server now)

Actually the only really needed config for exim is in the 2 lines from my PR and this has no negative impact if there is only one certificate using SANs.
The bash script is just for making it easier to deploy the certificates based on the records in the vexim-DB.
This script is also doing renewal of the certificates - put it in a daily cron job doesn't hurt.

I don't know how people normally get/deploy there certificates - no matter of one cert per domain or a single cert with SANs. But a script like this will do the automation of the crucial process of adding/removing/renewing domains.

BTW: I didn't test the script with IPv4 as IPv6 is easier on a NATed virtualisation environment. But i think there is a bug or a problem when the server is behind a NAT. I'll look into this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants