diff --git a/createlinks b/createlinks index 3e3babf..c5e8f66 100644 --- a/createlinks +++ b/createlinks @@ -21,6 +21,7 @@ event_link("adjust-dovecot", $event, "02"); event_link("systemd-reload", $event, "89"); event_link("systemd-default", $event, "88"); templates2events("/etc/rsyslog.conf", $event); +templates2events("/etc/dovecot/ssl/dhparam.pem", $event); # in case the ip change safe_symlink("sigusr2", "root/etc/e-smith/events/ip-change/services2adjust/dovecot"); @@ -37,3 +38,12 @@ safe_touch("root/home/e-smith/db/dovecot/sharedmailbox.db"); templates2events("/home/e-smith/files/public/dovecot-acl", "email-update"); + +$event = "dhparam-update"; +templates2events("/etc/dovecot/ssl/dhparam.pem", $event); +safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/dovecot"); + +$event = "smeserver-base-update"; +templates2events("/etc/dovecot/ssl/dhparam.pem", $event); +safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/dovecot"); + diff --git a/root/etc/e-smith/templates.metadata/etc/dovecot/ssl/dhparam.pem b/root/etc/e-smith/templates.metadata/etc/dovecot/ssl/dhparam.pem new file mode 100644 index 0000000..e079d4a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/dovecot/ssl/dhparam.pem @@ -0,0 +1,6 @@ +TEMPLATE_PATH="/home/e-smith/dh.pem" +OUTPUT_FILENAME="/etc/dovecot/ssl/dhparam.pem" +UID="root" +GID="root" +PERMS=0644 + diff --git a/root/sbin/e-smith/systemd/dovecot-control b/root/sbin/e-smith/systemd/dovecot-control deleted file mode 100644 index a9ec36c..0000000 --- a/root/sbin/e-smith/systemd/dovecot-control +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Create dhparam -[ -e /etc/dovecot/ssl/dhparam.pem ] || \ - RANDFILE=/dev/null /usr/bin/openssl dhparam -out /etc/dovecot/ssl/dhparam.pem 2048 diff --git a/root/usr/lib/systemd/system/dovecot.service.d/50koozali.conf b/root/usr/lib/systemd/system/dovecot.service.d/50koozali.conf index 49e2e45..8975b0a 100644 --- a/root/usr/lib/systemd/system/dovecot.service.d/50koozali.conf +++ b/root/usr/lib/systemd/system/dovecot.service.d/50koozali.conf @@ -6,7 +6,7 @@ ExecStartPre=-/sbin/e-smith/service-status dovecot ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/dovecot.conf ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/master.users ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/ssl/imapd.pem -ExecStartPre=-/sbin/e-smith/systemd/dovecot-control +ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/ssl/dhparam.pem ExecStartPre=-/usr/sbin/portrelease dovecot Restart=always #SME:11733 needed for Dovecot quota-fs https://doc.dovecot.org/configuration_manual/quota/quota_fs/ diff --git a/smeserver-dovecot.spec b/smeserver-dovecot.spec index 28785f8..7a86b65 100644 --- a/smeserver-dovecot.spec +++ b/smeserver-dovecot.spec @@ -1,5 +1,5 @@ %define version 11.0.0 -%define release 15 +%define release 16 %define name smeserver-dovecot @@ -41,6 +41,9 @@ Configure the dovecot IMAP server with sieve scripts support, quota, ACL, extended logging, master user %changelog +* Tue Mar 18 2025 Jean-Philippe Pialasse 11.0.0-16.sme +- fix [SME: ] + * Sun Jan 19 2025 Jean-Philippe Pialasse 11.0.0-15.sme - use spamd user for spams/ham learning [SME: 12265] max size to learn hardocded to 5MB.