From owner-freebsd-questions@FreeBSD.ORG Tue Apr 21 14:12:09 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 073DC106564A for ; Tue, 21 Apr 2009 14:12:09 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAE18FC14 for ; Tue, 21 Apr 2009 14:12:08 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by qyk3 with SMTP id 3so1907115qyk.3 for ; Tue, 21 Apr 2009 07:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=ODAozRJ+cPJPNKizqR9/WmaLzGVlLaEKfu0Ia36Ac+4=; b=PPQ3W7TYUcMroJaeh1dAt+3OyNYPr4wp36KAnsVBOE2t7a5nqng0zH92b18TYu0BDu BxTIGOJ3Jolf8Cquswm3ssj1Ond0fy3ov2nW7w3Nt726KeJKuC3bbgyAzqrKSS1Fgz+i A96yBOZkqFP1h5JedvSuUHVZcPzDeDHhOijNk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=uvtRltcxFs5Yf4XmIrAbodDaW7YW8Vi1GreTV8WdsntR5UO3JPbZxUMLhQjbaWchSr eInwGyhlaad9BQNxYH+O6QC1NKl0ez6dqlpKINJJ0Ksl4UPpT2ABGwfARD4FgyAaU31j R9O0FxqhbO1bDxG009cBUvNWOYj+sttCcf1C8= MIME-Version: 1.0 Received: by 10.220.46.146 with SMTP id j18mr8475215vcf.45.1240323127446; Tue, 21 Apr 2009 07:12:07 -0700 (PDT) In-Reply-To: <49ED9454.5030100@infracaninophile.co.uk> References: <200904211106.01965.mel.flynn+fbsd.questions@mailing.thruhere.net> <49ED9454.5030100@infracaninophile.co.uk> From: Tim Judd Date: Tue, 21 Apr 2009 08:11:52 -0600 Message-ID: To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Preventing ntpd from adjusting time (backwards) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 14:12:09 -0000 On Tue, Apr 21, 2009 at 3:39 AM, Matthew Seaman < m.seaman@infracaninophile.co.uk> wrote: > Mel Flynn wrote: > > Hi, > > > > Some coarse reading of ntpd(8) and ntp.conf(5) doesn't lead me to believe > it's > > possible to make ntpd *not* adjust the time. With adjust I don't mean the > skew > > operation, but really change the time. Backwards is my primary concern > but if > > it can be turned off completely it's fine with me. > > > > Reason being dovecot bailing out when this happens: > > Apr 1 16:18:26 squish ntpd[1353]: time reset -6.711955 s > > > > Apr 1 16:18:26 mx1 dovecot: Fatal: Time just moved backwards by 6 > seconds. > > This might cause a lot of problems, so I'll just kill myself now. > > http://wiki.dovecot.org/TimeMovedBackwards > > > > This seems to be a bete-noir for the dovecot developer. Whatever, it is > a royal pain in the arse, as my mailserver always steps the time > backwards on each reboot, and then dovecot does it's dying swan thing. > > Three choices: > > * Don't run 'ntpd -g' as the documentation tells you is the modern and > accepted method. Instead, run 'ntpdate' as a separate process and > run 'ntpd' without the '-g' flag. > > * Don't run dovecot. Other IMAP servers do not suffer in the same > way. > > * Put up with it. Avoid reboots, and swear at all concerned any time > you really do have to reboot. > > Cheers, > > Matthew > How about adding ntpdate's provided string to dovecot's required string in their respective startup rc.d scripts? This forces dovecot to wait until ntpdate has been called, assuming time has actually been set/changed, then dovecot may start? I'd try that. :D