Starting dovecot (version 2.0.16) with rc_service dovecot start works as expected. Stopping dovecot with rc_service dovecot stop generates an error: dovecot | * Caching service dependencies ... [ ok ] dovecot | * Stopping dovecot ... dovecot | * start-stop-daemon: fopen `base_dir = /var/run/dovecot/master.pid': No such file or directory [ ok ] I have the following base_dir entry in /etc/dovecot/dovecot.conf that triggers the error: base_dir = /var/run/dovecot Reproducible: Always Steps to Reproduce: 1.Have a line like base_dir = /var/run/dovecot in your /etc/dovecot/dovecot.conf 2.Start dovecot with rc_service dovecot start 3.Stop dovecot with rc_service dovecot stop Actual Results: dovecot | * Caching service dependencies ... [ ok ] dovecot | * Stopping dovecot ... dovecot | * start-stop-daemon: fopen `base_dir = /var/run/dovecot/master.pid': No such file or directory [ ok ] Expected Results: dovecot | * Stopping dovecot ... [ ok ] quick patch to fix /etc/init.d/dovecot: 26c26 < DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir[[:space:]]=[[:space:]]*\(.*[^/]\)/\?$#\1#;p}') --- > DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}')
A small correction to the patch: 26c26 < DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir[[:space:]]*=[[:space:]]*\(.*[^/]\)/\?$#\1#;p}') --- > DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}')
Ugh, that's an old old init script and was removed from the tree in 2009. Why are you still using it? Please check your config if emerging does not prompt you for an upgraded init script. Closing as invalid.
(In reply to comment #2) > Ugh, that's an old old init script and was removed from the tree in 2009. Why > are you still using it? Please check your config if emerging does not prompt > you for an upgraded init script. Very interesting, I installed dovecot end of December 2011. So probably there were some remnants of an old installation. Sorry for the inconvenience.