Serve certificate based on SNI #4131
-
Can Dovecot be configured to use the correct certificate based on SNI? For example:
Both DNS records point to The docker-mailserver hostname is When I try to fetch email from I hope this is clear. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Afaik only one certificate (file) can be used with DMS. However, you can use a SAN certificate, containing all needed hostnames. |
Beta Was this translation helpful? Give feedback.
-
The MX records point to A/AAAA records for the same zone (their domain), and those resolve to an IP for the server running DMS. Is there a reason the MX records cannot point to a common DNS A/AAAA record that maps to DMS? If you were using a proprietary mail provider for example, you'd point your MX records to that service too. For example, look at Github: $ docker run --rm -it --dns 1.1.1.1 ghcr.io/natesales/q github.com MX
github.com. 1h MX 1 aspmx.l.google.com.
github.com. 1h MX 10 alt3.aspmx.l.google.com.
github.com. 1h MX 10 alt4.aspmx.l.google.com.
github.com. 1h MX 5 alt1.aspmx.l.google.com.
github.com. 1h MX 5 alt2.aspmx.l.google.com. What is the requirement for your setup? If your server with DMS changes IP, all associated domains would need to update their records or fail to deliver mail. You should only need one TLS cert, the one that is under your control to provision for DMS. Use the SAN approach as suggested, or if you do not own those domains then do as I've advised and configure like I just showed with Github, point MX records to the DNS domain that belongs to DMS, avoid indirection. Dovecot does support SNI I think but DMS does not provide any means to manage that for you. You'd need to use |
Beta Was this translation helpful? Give feedback.
Afaik only one certificate (file) can be used with DMS.
However, you can use a SAN certificate, containing all needed hostnames.