Thanks for reply Ondřej,

After analysing /usr/lib/cyrus/bin/init-helper I see what is the problem.
>From one side everything is implemented correctly: once I use the default
imap.conf, the script should also work OK (and it indeed creates
/var/run/cyrus/socket and other stuff). However I was not 100% exact with
problem description -- sorry for that. The actual value is:

lmtpsocket: /var/run/postfix/cyrus/lmtp

I used different from default once location because later /var/run/postfix
is bound to /var/spool/postfix/var/run (to make it possible for chrooted
postfix to communicate with cyrus).

That is why I re-formulate the problem:

Cyrus does not create directory in /var/run if it differs from default
one (/var/run/cyrus).

Expected that the actual values from configuration file /etc/imapd.conf are
considered in function fixdirs().

On 2016-05-30 09:46, Ondřej Surý wrote:
> Hi Dmitry,
> 
> each init script runs:
> 
> /usr/sbin/cyrus init-helper start
> 
> that creates /var/run/cyrus and /var/run/cyrus/socket directories.
> 
> Could you run:
> 
> bash -x /usr/lib/cyrus/bin/init-helper start
> 
> on your system to see what went wrong?
> 
> Cheers,
>
> -- Ondřej Surý <ond...@sury.org> Knot DNS (https://www.knot-dns.cz/)
>>> On Sun, May 29, 2016, at 21:43, Dmitry Katsubo wrote:
>>> 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

Reply via email to