postfix should start after time is set

Hi, I’m using Leap-15.6 on a Raspberry Pi 4, without saved clock. When booting, the date is always December 16th of 2024. When Postfix starts, the date is still wrong, so it generates the file "virtual.lmdb", because the file "virtual" is newer. Then, after chronyd has adjusted the clock, Postfix starts filling the log files with this message: warning: database /etc/postfix/virtual.lmdb is older than source file /etc/postfix/virtual What is the cleanest way, to avoid this problem please? TIA for any help, -- Peter

On Thu, Jan 23, 2025 at 3:07 PM Peter Münster <pm@a16n.net> wrote:
Hi,
I’m using Leap-15.6 on a Raspberry Pi 4, without saved clock.
When booting, the date is always December 16th of 2024.
When Postfix starts, the date is still wrong, so it generates the file "virtual.lmdb", because the file "virtual" is newer.
Then, after chronyd has adjusted the clock, Postfix starts filling the log files with this message: warning: database /etc/postfix/virtual.lmdb is older than source file /etc/postfix/virtual
What is the cleanest way, to avoid this problem please?
You could try enabling chrony-wait.service and ordering postfix service after it.

"PM" == Peter Münster <pm@a16n.net> writes:
PM> Hi, I’m using Leap-15.6 on a Raspberry Pi 4, without saved clock. PM> When booting, the date is always December 16th of 2024. PM> When Postfix starts, the date is still wrong, so it generates the file PM> "virtual.lmdb", because the file "virtual" is newer. PM> Then, after chronyd has adjusted the clock, Postfix starts filling the PM> log files with this message: warning: database PM> /etc/postfix/virtual.lmdb is older than source file PM> /etc/postfix/virtual PM> What is the cleanest way, to avoid this problem please? You can set in /etc/sysconfig/postfix POSTFIX_UPDATE_MAPS=no. which would not update the maps also setting the following in /etc/sysconfig/mail MAIL_CREATE_CONFIG="no" should prevent recreating main.cf and master.cf for postfix -- Life is endless possibilities, and there is freedom to choose!

On Thu, Jan 23 2025, toganm@dinamizm.com wrote:
which would not update the maps
I want the maps updated...
also setting the following in /etc/sysconfig/mail
MAIL_CREATE_CONFIG="no"
should prevent recreating main.cf and master.cf for postfix
Strange. It’s "yes", but main.cf and master.cf are not recreated... (Just as I want.) Perhaps a bug? -- Peter

On Thu, Jan 23 2025, Peter Münster wrote:
MAIL_CREATE_CONFIG="no"
should prevent recreating main.cf and master.cf for postfix
Strange. It’s "yes", but main.cf and master.cf are not recreated... (Just as I want.)
Perhaps a bug?
It seems to be all right, no bug. "yes" means: "create main.cf and master.cf once", but not at every start. See /usr/lib/postfix/systemd/config_postfix. -- Peter

"PM" == Peter Münster <pm@a16n.net> writes:
PM> On Thu, Jan 23 2025, Peter Münster wrote: >>> MAIL_CREATE_CONFIG="no" >>> >>> should prevent recreating main.cf and master.cf for postfix >> >> Strange. It’s "yes", but main.cf and master.cf are not recreated... >> (Just as I want.) >> >> Perhaps a bug? PM> It seems to be all right, no bug. "yes" means: "create main.cf and PM> master.cf once", but not at every start. See PM> /usr/lib/postfix/systemd/config_postfix. Thanks for the tip. I disable this and don't use sysconfig/postfix at all as it is too much work to add POSTFIX_ADD_* for the customization I do -- Life is endless possibilities, and there is freedom to choose!
participants (3)
-
Andrei Borzenkov
-
Peter Münster
-
toganm@dinamizm.com