[systemd-devel] Alias for SMTP providers [ie. mutually exclusive service alternatives]

Lennart Poettering lennart at poettering.net
Wed Jun 16 07:43:23 UTC 2021


On Di, 15.06.21 02:03, Kenneth Porter (shiva at sewingwitch.com) wrote:

> What happens if I list multiple services in a Wants= and After= clause that
> are mutually exclusive (eg. sendmail/postfix/exim? How can I say "This unit
> needs to send mail" without knowing which is enabled?

What does "needs to send mail" even mean? That /usr/sbin/sendmail can
be called to queue a message? That you can talk to localhost:25?

A well behaving MTA actually make /usr/sbin/sendmail work without the
main mail daemon to be up. The mail is then only enqueued, but not
dispatched, but that'll be done once the service is fully up.

A well behaving MTA would also support socket activation, so that the
port 25 is already bound while the daemon tarts up. This means that no
ordering for regular services is necessary.

Anyway, we do not provide any generic target for this, but your distro
might add that.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list