From ca6a27f5c24829daa94ad3fd0f6295f367d8f476 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 19 Sep 2024 10:05:07 +0300 Subject: [PATCH] admin/errors: Document time syncing at server startup. --- docs/core/admin/errors.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/core/admin/errors.md b/docs/core/admin/errors.md index 1a72dcf78..c45379fbe 100644 --- a/docs/core/admin/errors.md +++ b/docs/core/admin/errors.md @@ -118,13 +118,15 @@ subscribing/unsubscribing to folders in the public namespace. ## Time Moved Backwards Error Dovecot isn't very forgiving if your system's time moves backwards. -There are usually two possibilities why it's moving backwards: +There are usually three possibilities why it's moving backwards: 1. You're running `ntpdate` periodically. This isn't a good idea. 2. You're using some kind of a virtual server and you haven't configured it right (or it's buggy). +3. Dovecot is started before time is synchronized at server startup. + Moving time backwards might cause various problems (see below). ### Time Synchronization @@ -152,6 +154,12 @@ problem, fix your init scripts to run ntpd/ntpdate first, before starting Dovecot. Also, seriously consider running ntp-wait before starting Dovecot. +### Server Startup Time Synchronization + +With systemd add `time-sync.target` to the `After` setting. This isn't +enough though, because it only waits for time-sync to start, not finish. +To do that, enable also `systemd-time-wait-sync.service`. + ### What about Daylight Saving/Summer Time? On Unix-like systems, time is stored internally as the number of seconds