Hide Forgot
Description of problem: ----------------------- After reboot postfix fails to start with following message in the syslog: Nov 06 19:17:22 testmachine.example.com postfix[1200]: fatal: parameter inet_interfaces: no local interface found for 127.0.0.2 - The postfix systemd start-script is depending to network.target (and not network-online.target as it probably should be). - Due to this it gets to race condition where network-manager is just started but not finished setting-up network interfaces. - At this precise point it tries to resolve its $myhostname as defined in /etc/postfix/main.cf or obtained from gethostname() by default and gots 127.0.0.2 - then it tries to identify a local device which has this IP address configured, but doen't find any (it would be wrong address anyway) - so the start of the service after reboot fails - then the network manager finishes the network configuration so all the resolving works fine from now on so it is hard to get idea where is this 127.0.0.2 coming from Version-Release number of selected component (if applicable): ------------------------------------------------------------- tested with postfix-3.2.3-1.fc26, but the situation is the same in rawhide and fc27. How reproducible: ----------------- Race condition during start of network-manager probably dependent on the number of network cards. On one of my machines it was failing in 100% cases (machine with cca 10 physical interfaces), but on some different machine I believe it could be 100% success (like machine with only 1 physical network card). Steps to Reproduce: ------------------- 0. have many network cards 1. instal postfix (dnf -y install postfix) 2. enable it to start automatically (systemctl enable postfix) 3. reboot the machine 4. check the staus after reboot (systemctl status postfix) Additional info: ---------------- I believe the dependency should be changed from network.target to network-online.target in /usr/lib/systemd/system/postfix.service: [Unit] Description=Postfix Mail Transport Agent After=syslog.target network-online.target Conflicts=sendmail.service exim.service .... Even if you manualy define correct $myhostname in /etc/postfix/main/cf and its correct IP resolv in /etc/hosts, the postfix service still fails to start at reboot, because at that point it would know the correct IP address, but that would not be ready on some network interface. The error in this situation would be : Nov 06 19:17:22 testmachine.example.com postfix[1200]: fatal: parameter inet_interfaces: no local interface found for 111.222.33.44 Best regards Michal Ambroz
*** This bug has been marked as a duplicate of bug 1116538 ***
$ cat /etc/systemd/system/postfix.service.d/local.conf [Unit] After=network-online.target
(In reply to Ken Stailey from comment #2) > $ cat /etc/systemd/system/postfix.service.d/local.conf > [Unit] > After=network-online.target This worked for me.