dovecot-imapd incompatible with ntpdate use

Bug #347881 reported by Whit Blauvelt on 2009-03-24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)

Bug Description

Binary package hint: dovecot-imapd

As described at, any reset of the system clock backwards causes dovecot-imapd to abort itself. In Ubuntu's standard /etc/network/if-up.d is an "ntpdate" script which runs ntpdate if static interface is brought up. In my case, taking an interface up and down triggered ntpdate's reset of the system clock back by 6 seconds. It took some hours for a user to bring to my attention that imapd was down.

Possible fixes:

1. Add an "ntp" dependency to the dovecot-imapd package, so that ntpdate invocation won't be so likely to trigger a clock reset backwards and imapd failure. For extra points (if this isn't the case already) have the if-up.d/ntpdate script abort if ntpd is running.

- or -

2. Alter the if-up.d/ntpdate script so it does _not_ run ntpdate just if dovecot-imapd is running.

- or -

3. Patch dovecot-imapd so that when it aborts for this reason it puts a notice on all open tty's - since asking sysadmins to watch the logs for its shutdown notice when doing the seemingly unrelated task of bringing up an interface is a bit much.

- or -

4. Make all 3 changes.

(This is on an Intrepid system that the behavior was noticed. But if-up.d/ntpdate has been there for awhile - certainly it's in Hardy - with dovecot-imapd 1:1.1.4-0ubuntu1.2.)

Andreas Olsson (andol) wrote :

I just reproduced this exact issue in Jaunty (dovecot 1:1.1.11-0ubuntu2). That is; I set my clock to run ahead, restarted my network which triggered a ntpdate. Hence my clock was set back to the correct time, leading to dovecot shutting itself down.

"dovecot: Fatal: Time just moved backwards by 420 seconds. This might cause a lot of problems, so I'll just kill myself now."

Today dovecot-common Suggest the package ntp. Perhaps it could at least be upgraded to a Recommends?

Changed in dovecot:
status: New → Confirmed
Jim Tarvid (tarvid) wrote :

I get the same error.

ntp is installed - default configuration

ntpdate is installed

Scott Moser (smoser) wrote :

I would personally think this is an issue with ntpdate, specifically with its hook in if-up.d. time shouldn't really run backwards.

I'm looking at karmic, that script (/etc/network/if-up.d/ntpdate) says:

| # This is a heuristic: The idea is that if a static interface is brought
| # up, that is a major event, and we can put in some extra effort to fix
| # the system time. Feel free to change this, especially if you regularly
| # bring up new network interfaces.
| if [ "$METHOD" = static ]; then
| OPTS="-b"
| fi

So, that can easily enough be commented out. However, I'd think this should be more specifically configurable (/etc/default/ntpdate perhaps), and personally think the default should be to not run backwards except on first boot.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dovecot - 1:1.2.9-1ubuntu4

dovecot (1:1.2.9-1ubuntu4) lucid; urgency=low

  * debian/contorl: Recommend ntpdate. (LP: #347881)
 -- Chuck Short <email address hidden> Tue, 09 Mar 2010 14:30:15 -0500

Changed in dovecot (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers