From ee02317ed5e8f9ae2729bd9435462ffa9ba3046f Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 25 Jan 2024 08:09:35 -0800 Subject: [PATCH] allow for SAN mail certs --- bin/vmail-dovecot-enable.sh | 2 +- etc/exim4/exim4.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/vmail-dovecot-enable.sh b/bin/vmail-dovecot-enable.sh index 6382752..733b717 100755 --- a/bin/vmail-dovecot-enable.sh +++ b/bin/vmail-dovecot-enable.sh @@ -44,7 +44,7 @@ fi # create dovecot config & restart if [ ! -f "/etc/dovecot/sites.d/$confile" ]; then - echo "local_name $maildomain {" > /etc/dovecot/sites.d/$confile + echo "local_name \"mail.$domain imap.$domain pop.$domain smtp.$domain\" {" > /etc/dovecot/sites.d/$confile echo " ssl_cert = > /etc/dovecot/sites.d/$confile echo " ssl_key = > /etc/dovecot/sites.d/$confile echo "}" >> /etc/dovecot/sites.d/$confile diff --git a/etc/exim4/exim4.conf b/etc/exim4/exim4.conf index f7531a0..9c7a604 100644 --- a/etc/exim4/exim4.conf +++ b/etc/exim4/exim4.conf @@ -16,7 +16,7 @@ smtp_accept_queue_per_connection = 50 .include /etc/exim4/exim_local.conf tls_advertise_hosts = * -tls_certificate = ${if exists{/etc/ssl/letsencrypt/${tls_sni}.pem}{/etc/ssl/letsencrypt/${tls_sni}.pem}} +tls_certificate = ${if exists{/etc/ssl/letsencrypt/${sg{${tls_sni}}{^smtp\.}{mail.}}.pem}{/etc/ssl/letsencrypt/${sg{${tls_sni}}{^smtp\.}{mail.}}.pem}} tls_on_connect_ports = 465 daemon_smtp_ports = 25 : 465 : 587