Package: cyrus-imapd-2.4
Version: 2.4.17+nocaldav-2+b1

Hello,

I have noticed that Cyrus does not create necessary directory in /var/run
when needed. For example, when the following is specified in /etc/imapd.conf

lmtpsocket: /var/run/cyrus/lmtp

the directory /var/run/cyrus is not created, even though Cyrus starts up and
functions ok.

Expected: the directory /var/run/cyrus (or any other necessary top-level
directory) is created or Cyrus complains that directory is not writeable.

Solution: Do it in init.d script (very draft suggestion is attached) or via
/etc/tmpfiles.d/cyrus.conf:

d /var/run/cyrus 0755 cyrus mail

-- 
With best regards,
Dmitry
--- /etc/init.d/cyrus-imapd.orig        2015-03-24 12:10:20.000000000 +0100
+++ /etc/init.d/cyrus-imapd     2016-05-29 21:31:56.947282286 +0200
@@ -61,6 +61,14 @@
 
 SYNC_CLIENT=/usr/lib/cyrus/bin/sync_client
 SYNCSHUTDOWN="$(gawk '/^sync_shutdown_file:[[:blank:]]/ { print $2 }' $CONF)"
+SOCKET="$(gawk '/^lmtpsocket:[[:blank:]]/ { print $2 }' $CONF)"
+
+if [ ! -z "$SOCKET" ]
+then
+       SOCKET_DIR=`dirname $SOCKET`
+       [ -d "$SOCKET_DIR" ] || mkdir -p "$SOCKET_DIR"
+       chown cyrus.mail "$SOCKET_DIR"
+fi
 
 # Load the VERBOSE setting and other rcS variables
 . /lib/init/vars.sh

Reply via email to