Dodan DH iz paketa dovecot-core </usr/share/dovecot/dh.pem
authorZeljko Boros <Zeljko.Boros@carnet.hr>
Mon, 3 May 2021 14:05:11 +0000 (16:05 +0200)
committerZeljko Boros <Zeljko.Boros@carnet.hr>
Mon, 3 May 2021 14:05:11 +0000 (16:05 +0200)
debian/postinst

index a26e2a9..f66c3c3 100755 (executable)
@@ -96,6 +96,16 @@ if ! grep -q "^ssl_min_protocol = TLS" /etc/dovecot/conf.d/10-ssl.conf; then
                         /etc/dovecot/conf.d/10-ssl.conf || true
 fi
 
+### buster ima DH ključ koji se nalazi u paketu dovecot-core
+# ne radimo ništa ako već postoji ^ssl_dh koji nije prazan
+
+if ! grep -q "^ssl_dh = /" /etc/dovecot/conf.d/10-ssl.conf; then
+       # postavlja DH i uključuje varijablu
+       cp_check_and_sed '#ssl_dh =' \
+                        's,^#ssl_dh.*,ssl_dh = </usr/share/dovecot/dh.pem,g' \
+                        /etc/dovecot/conf.d/10-ssl.conf || true
+fi
+
 # maknuti kludge kreiran u carnet-upgrade
 test -f /etc/dovecot/conf.d/95-cn6-upgrade.conf && mv /etc/dovecot/conf.d/95-cn6-upgrade.conf /var/backups || true
 test -f /etc/dovecot/conf.d/95-cn7-upgrade.conf && mv /etc/dovecot/conf.d/95-cn7-upgrade.conf /var/backups || true