FYI for dovecot users - Mandriva
This is a discussion on FYI for dovecot users - Mandriva ; Check this out
http://wiki.dovecot.org/TimeMovedBackwards
My solution, move dovecot start up links to start after ntpd.
In /etc/init.d/dovecot
change # chkconfig: 345 54 46
to # chkconfig: 345 57 46
then do a
service dovecot stop
chkconfig --del dovecot
chkconfig --add ...
-
FYI for dovecot users
Check this out
http://wiki.dovecot.org/TimeMovedBackwards
My solution, move dovecot start up links to start after ntpd.
In /etc/init.d/dovecot
change # chkconfig: 345 54 46
to # chkconfig: 345 57 46
then do a
service dovecot stop
chkconfig --del dovecot
chkconfig --add dovecot
service dovecot start
I happen to have created and install_changes script to automate all my
custom changes after a clean install. dovecot snippet follows:
#*******************************
# dovecot fix
#*******************************
_fn=/etc/init.d/dovecot
if [ -e $_fn ] ; then
if [ ! -e ${_fn}_orig ] ; then
echo "fixing $_fn"
cp $_fn ${_fn}_orig
chmod -x ${_fn}_orig
/bin/cp /dev/null $_fn
while read line ; do
set -- $line
if [ "$2" = "chkconfig:" ] ; then
line="# chkconfig: 345 57 46"
fi
if [ "$2" = "\"Usage:" ] ; then
line=" gprintf \"Usage: %s {start|stop|restart|reload|condrestart|status}\\n\" \"\$0\" "
fi
echo "$line" >> $_fn
done < ${_fn}_orig
fi
service dovecot stop
/sbin/chkconfig --del dovecot
/sbin/chkconfig --add dovecot
service dovecot start
fi
_fn=/etc/dovecot.conf
if [ -e $_fn ] ; then
if [ ! -e ${_fn}_orig ] ; then
echo "fixing $_fn"
cp $_fn ${_fn}_orig
chmod -x ${_fn}_orig
/bin/cp /dev/null $_fn
while read line ; do
set -- $line
if [ "$1" = "#mail_location" ] ; then
line="mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u"
fi
if [ "$1" = "#protocols" ] ; then
line="protocols = imap imaps"
fi
echo "$line" >> $_fn
done < ${_fn}_orig
fi
fi
-
Re: FYI for dovecot users
On Fri, 17 Oct 2008 19:03:45 +0000 (UTC), Bit Twister wrote:
> Check this out
> http://wiki.dovecot.org/TimeMovedBackwards
>
> My solution, move dovecot start up links to start after ntpd.
>
> In /etc/init.d/dovecot
> change # chkconfig: 345 54 46
> to # chkconfig: 345 57 46
>
> then do a
> service dovecot stop
> chkconfig --del dovecot
> chkconfig --add dovecot
> service dovecot start
>
If using ntp, you might consider changing the /etc/init.d/dovecot header to read
#!/bin/bash
#
# Init file for Dovecot IMAP daemon
#
# Written by Dag Wieers .
#
# chkconfig: 345 57 46
# description: Dovecot IMAP Daemon
#
# processname: dovecot
# config: /etc/dovecot.conf
# pidfile: /var/run/dovecot
### BEGIN INIT INFO
# Provides: dovecot
# Should-Start: ntpd
# Default-Start: 3 4 5
# Short-Description: Starts dovecot daemon
# Description: Dovecot IMAP Daemon
### END INIT INFO
# source function library
-
Re: FYI for dovecot users
On Fri, 17 Oct 2008 15:03:45 -0400, Bit Twister wrote:
> Check this out
> http://wiki.dovecot.org/TimeMovedBackwards
>
> My solution, move dovecot start up links to start after ntpd.
So for systems where the clock is set to localtime, will it be a problem
using dovecot between Sunday, November 2, 2008 at 0200 Daylight Saving time
and 0200 Standard time?
Looking at the code (in dovecot-1.1.3/src/lib/ioloop.c), it'll sleep if the
time has moved back by 5 seconds or less, but will terminate with an error
message, if the time is more than 5 seconds.
Looks like it will die when Standard time kicks in, and will be down for
an hour. Pretty messy way to handle things.
Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
-
Re: FYI for dovecot users
David W. Hodgins wrote:
> So for systems where the clock is set to localtime, will it be a problem
> using dovecot between Sunday, November 2, 2008 at 0200 Daylight Saving
> time and 0200 Standard time?
I doubt it. DST & timezone offsets are applied when rendering the clock into
a human-readable form. I would expect dovecot to use some form of the
system clock which is typically UTC.
Simon