View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0013323||CentOS-7||postfix||public||2017-05-28 13:14||2020-08-23 01:24|
|Target Version||Fixed in Version|
|Summary||0013323: Postfix fails to start on reboot when inet_interfaces set to specific interfaces.|
|Description||Postfix fails to start on reboot when inet_interfaces set to specific interfaces. If you then login you can manually start postfix as all network interfaces are up at that point.|
|Steps To Reproduce||In main.cf:|
inet_interfaces = localhost, smtp.example.org
|Additional Information||Looking through /var/log/messages it seems postfix is starting after the loopback interface but before eth0.|
A workaround is to change main.cf to:
inet_interfaces = all
Whilst this works it isn't always desirable to bind postfix to all interfaces.
Looking at the postfix systemd configuration I believe postfix should not try starting until all network interfaces are up.
May 26 12:08:32 mail network: Bringing up loopback interface: [ OK ]
May 26 12:08:33 mail systemd: postfix.service: control process exited, code=exited status=1
May 26 12:08:33 mail systemd: Failed to start Postfix Mail Transport Agent.
May 26 12:08:33 mail systemd: Unit postfix.service entered failed state.
May 26 12:08:33 mail systemd: postfix.service failed.
May 26 12:08:33 mail kernel: hv_netvsc vmbus_15: net device safe to remove
May 26 12:08:33 mail kernel: hv_netvsc: hv_netvsc channel opened successfully
May 26 12:08:33 mail systemd: Started MariaDB database server.
May 26 12:08:33 mail kernel: hv_netvsc vmbus_15: Send section size: 6144, Section count:2560
May 26 12:08:33 mail kernel: hv_netvsc vmbus_15: Device MAC 00:1d:db:b7:1d:77 link state up
May 26 12:08:33 mail kernel: bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
May 26 12:08:33 mail kernel: Netfilter messages via NETLINK v0.30.
May 26 12:08:33 mail kernel: ip_set: protocol 6
May 26 12:08:33 mail systemd: Time has been changed
May 26 12:08:44 mail network: Bringing up interface eth0: [ OK ]
I cannot reproduce this, but symptom seems similar as in
sshd.service fails start during boot if ListenAddress directive is used
Add systemd config to start postfix after network.online target.
Add a new file /etc/systemd/system/postfix.service.d/online.conf :
then do "systemctl daemon-reload", and reboot.
Since this config file is out of RPM administration, it should survive yum updates.
If /var/log/messages shows invocation order of
Jun 2 11:14:46 UEFI73 systemd: Reached target Network is Online.
Jun 2 11:14:46 UEFI73 systemd: Starting Postfix Mail Transport Agent...
then the workaround is working.
Thank you for providing the workaround.
I'm running CentOS 8 and still having the issue with Postfix failing at startup. Just applied your workaround then restarted. And, voilà, no more Postfix failure.
It's actually quite reasonable that Postfix shouldn't start until network is completely online.
Like @kochin, I also had problems with postfix starting at boot time under CentOS 8. You're solution resolves the issue.