[exim] Re: systemd unit - Requires/Wants/...

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Chris Siebenmann
Datum:  
To: Andreas Metzler
CC: exim-users, Chris Siebenmann
Betreff: [exim] Re: systemd unit - Requires/Wants/...
> I am not 100% sure what the best/correct dependencies for Debian's
> systemd unit (Type=exec) are.
>
> For reference exim git has:
> Requires=network.target
> After=networking.target


As a general note, 'Requires=' is potentially dangerous, because it
means 'if the other unit is shut down, so will this one'; this also
includes restarts. For network.target this is probably not important
(although it does mean that if networking fails to start for some
reason, Exim will not start and so will not be available even for purely
local email).

> * exim usually will not be able to do something useful without
> nss-lookup.target and nss-user-lookup.target so these are candidates
> for After-directives. What about remote-fs.target or using
> RequiresMountsFor=/home or RequiresMountsFor=/var/mail?


As a system administrator, I would prefer that these not be listed as
explicit requirements. Our user home directories are not present in
/home and people may not deliver email to /var/mail (although we
actually do), and as far as I know it's difficult to *remove*
requirements from systemd unit files using drop-ins.

(Today the /home requirement is harmless for us since our Exim machines
have the default /home with nothing in it.)

    - cks
PS: Locally we guard various Exim processing with router conditions that
    require various markers in the filesystem; for example, we have a
    router that defers all further processing if a user's home directory
    isn't present for any reason, and we put this before all of the
    routers that look for .forwards, automatic vacation notices, and so
    on.


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/