Re: [exim] socket bind() to port 25 for address (any IPv4) f…

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim users
Subject: Re: [exim] socket bind() to port 25 for address (any IPv4) failed (#76)
On 05/04/2020 11:13, Heiko Schlittermann via Exim-users wrote:
[systemd forking mode]
> For what I understood - the main advantage is, that systemd doesn't have
> to guess the PID if the main process. And can do a better job in
> supervising (and restarting) the main process.
>
>> I've seen one disadvantage mentioned, although for an MTA it's
>> a real edge-case: in foreground mode, systemd assumes the service
>> is fully available immediately and will start any dependent items.
>
> And in forking mode? I *think*, as soon as the forking process returns,
> systemd assumes the service is available, doesn't it? Thus, the same may
> happen, if the forked process needs some time to setup its listeners and
> so on.


That's true, though there's a slight wrinkle. Apparently systemd does
not consider a "forking" service started until the process *it* forked
exits. By that time it must of course have forked a second time to
create the daemon process. Exim will have read its config by then -
but has not yet created the listener sockets. We should consider
moving the fork that bit later; if that works ok we'd be better off
under systemd (in forking mode).
--
Cheers,
Jeremy