On 7/28/2021 1:49 PM, Wietse Venema wrote:
Jim Garrison:
For anyone encountering this error, I've traced it to a regression of
a very old bug relating to systemd service ordering dependencies.
In my case, OS is CentOS Linux release 8.4.2105
postfix-3.5.8-1.el8.x86_64
Since a recent update I've found that, after every reboot, Postfix fails
to start, and logs the message
fatal: parameter inet_interfaces: no local interface found for 127.0.0.2
If I then manually start Postfix (systemctl start postfix) it starts
right up with no complaints.
Long story short, this appears to be a regression of the 6-year-old
systemd problem documented at
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1519331
The problem is that in CentOS 8, a recent update seems to have changed
Postfix's systemd service dependency from
After=syslog.target network-online.target
to
After=syslog.target network.target
This means that Postfix now starts up before the network is completely
up, and systemd's DNS resolution hack (systemd-resolved.service),
finding no interfaces up yet, resolves 'localhost' to 127.0.0.2.
(man systemd-resolved.service)
The simple fix is to create an override file with
systemctl edit postfix.service"
and restore the "After=" dependency on network-online.target
Thanks. I agree, Postfix should start up after the network is fully
initialized. That includes all the network interfaces, and all the
network infrastructure services.
Wietse
Who "owns" (and maintains) the systemd unit files for Postfix? Is that
up to each individual distro's maintainers? It would be nice if this
could be fixed in one place, but that's probably wishful thinking :-(
--
Jim Garrison
j...@acm.org