Discussion:
[SM-imapproxy] imapproxy start before dovecot
Torben Schou Jensen
2013-06-17 07:48:29 UTC
Permalink
On a Debian Stable Wheezy server, I am using SquirrelMail with imapproxy
and dovecot, all working fine.

But at reboots, imapproxy start before dovecot and as it can not connect
to dovecot, it exit.

Then webmail is down until I manually restart imapproxy.
So in case of power failure at night, webmail would be unavailable for
users until imapproxy have been restarted, not a good service.

in.imapproxyd: ServerInit(): Connection to server failed. Sleeping 5
seconds to retry...
in.imapproxyd: ServerInit(): Connection refused -- exiting

A solution could be to monitor imapproxy with monit, and thereby restart
it at reboot.
But a solution where imapproxy wait until dovecot is up would be better.

Anyone have a good solution for this?

squirrelmail (2:1.4.23~svn20120406-2)
dovecot-imapd (1:2.1.7-7)
imapproxy (1.2.7-1.1)

Brgds
Torben
Peter Schober
2013-06-17 08:57:49 UTC
Permalink
Post by Torben Schou Jensen
On a Debian Stable Wheezy server, I am using SquirrelMail with
imapproxy and dovecot, all working fine.
But at reboots, imapproxy start before dovecot and as it can not
connect to dovecot, it exit.
Try something like this:

$ diff /etc/init.d/imapproxy.old /etc/init.d/imapproxy
6c6
< # Required-Start: $syslog $network $local_fs $remote_fs
---
Post by Torben Schou Jensen
# Required-Start: $syslog $network $local_fs $remote_fs dovecot
-peter

Loading...