Marshal Newrock
2007-Jan-26 14:07 UTC
[Dovecot] environment variables required for startup
Using dovecot-1.0-rc19 (quotas are working good, btw) on Gentoo, I have a strange problem. On boot, dovecot doesn't start, the init script just times out. From the command line, it starts instantly without problem. Also, using a program called 'monit' to make sure processes stay running and restart them if they stop, if I manually stop dovecot, it is then unable to start it (calling the init script). Nothing gets logged. In all cases, it's "/etc/init.d/dovecot start". The only thing I can think of is that there's some environment variable required which isn't being set. monit specifically says it unsets everything except for a basic path before running the start program. Do any environment variables need to be set in order for dovecot to start successfully? -- Marshal Newrock Ideal Solution, LLC - http://www.idealso.com
On Friday 26 January 2007 3:07 pm, Marshal Newrock wrote:> The only thing I can think of is that there's some environment variable > required which isn't being set. monit specifically says it unsets > everything except for a basic path before running the start program. > Do any environment variables need to be set in order for dovecot to > start successfully?Something similar happened to me once on a Fedora Core 3 system with SELinux enabled, where a startup script using 'su -c' (not dovecot's) stopped to ask me if I wanted the SELinux context changed. Try running it like this /etc/init.d/dovecot < /dev/null to see if this makes any difference. Thank you for your consideration, Davide Bolcioni -- Paranoia is an afterthought.
> Using dovecot-1.0-rc19 (quotas are working good, btw) on Gentoo, I have > a strange problem. On boot, dovecot doesn't start, the init script just > times out. From the command line, it starts instantly without problem. > Also, using a program called 'monit' to make sure processes stay > running and restart them if they stop, if I manually stop dovecot, it > is then unable to start it (calling the init script). Nothing gets > logged. In all cases, it's "/etc/init.d/dovecot start". > > The only thing I can think of is that there's some environment variable > required which isn't being set. monit specifically says it unsets > everything except for a basic path before running the start program. > Do any environment variables need to be set in order for dovecot to > start successfully?Actually this would have more to do with Gentoo than with Dovecot. Check out the init script you are using. Are you getting any errors on the console where you run the init script? the init script we are using: #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init,v 1.3 2005/12/14 23:32:08 uberlord Exp $ depend() { need net after saslauthd ldap slapd postgresql mysql use logger } start() { ebegin "Starting dovecot" start-stop-daemon --start --exec /usr/sbin/dovecot \ --pidfile /var/run/dovecot/master.pid eend $? } stop() { ebegin "Stopping dovecot" start-stop-daemon --stop --exec /usr/sbin/dovecot \ --pidfile /var/run/dovecot/master.pid eend $? } HTH -- Kenny Dail <kend at amigo.net>