postfix starting before network

Rick Stevens ricks at alldigital.com
Tue Jul 1 21:29:33 UTC 2014


On 07/01/2014 01:13 PM, David Benfell issued this missive:
> Hi all,
>
> I have no idea why this might be happening. I've looked at the systemd
> control file for postfix and compared it to dovecot's. Both want the
> network.target before starting.

"want" is a weakened version of "requires". It doesn't guarantee start
sequence and if the target fails to start, it doesn't stop THIS service
from starting ("requires" WOULD prevent this service from starting if
the target of the "requires" failed).

> The difference is that dovecot starts correctly. Postfix does not. The
> problem has only appeared since Saturday, when I probably did a yum
> update.
>
> Postfix issues an error from one of the pre-commands having to do with
> the aliases database saying its network interface (and it duly lists
> the IPv4 address) doesn't exist. Starting postfix manually later
> works.

Have you checked the postfix.service file and verified it has 
"After=network.target" in it? That should make sure the network starts
before postfix.

In other words, if you have both "wants=network.target" and 
"after=network.target" in the "[Unit]" part of the postfix.service
file, the system would try to start network first, then start postfix.
Note that because you have "wants" and not "requires", postfix would try
to start even if network.target fails.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-  The problem with being poor is that it takes up all of your time  -
----------------------------------------------------------------------


More information about the users mailing list