diff mbox series

[meta-oe] dovecot: Fix service start error

Message ID 20251031053737.12912-1-liuyd.fnst@fujitsu.com
State New
Headers show
Series [meta-oe] dovecot: Fix service start error | expand

Commit Message

Liu Yiding Oct. 31, 2025, 5:37 a.m. UTC
1.Fix following dovecot.service starting error.
  dovecot[364]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 48: cert_file: open(/etc/dovecot/ssl-cert.pem) failed: No such file or directory
  systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
  systemd[1]: dovecot.service: Failed with result 'exit-code'.

2. There is no need to do "touch ${D}/etc/dovecot/dovecot.conf" as it was created by dovecot after dovecot was upgraded to 2.4.1-4.

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 meta-networking/recipes-support/dovecot/dovecot_2.4.1-4.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/dovecot/dovecot_2.4.1-4.bb b/meta-networking/recipes-support/dovecot/dovecot_2.4.1-4.bb
index 5894c76bac..40cf991ae1 100644
--- a/meta-networking/recipes-support/dovecot/dovecot_2.4.1-4.bb
+++ b/meta-networking/recipes-support/dovecot/dovecot_2.4.1-4.bb
@@ -54,8 +54,11 @@  SYSTEMD_AUTO_ENABLE = "disable"
 do_install:append () {
     rm -rf ${D}${libdir}/dovecot/dovecot-config
     install -d 755 ${D}/etc/dovecot
-    touch ${D}/etc/dovecot/dovecot.conf
     chmod 644 ${D}/etc/dovecot/dovecot.conf
+    touch ${D}/etc/dovecot/ssl-key.pem
+    touch ${D}/etc/dovecot/ssl-cert.pem
+    chmod 600 ${D}/etc/dovecot/ssl-key.pem
+    chmod 600 ${D}/etc/dovecot/ssl-cert.pem
     if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
         install -m 0644 ${UNPACKDIR}/dovecot.service ${D}${systemd_unitdir}/system
         sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service