[systemd-devel] Alias for SMTP providers [ie. mutually exclusive service alternatives]
Cristian Rodríguez
crrodriguez at opensuse.org
Fri Jun 18 16:59:51 UTC 2021
On Tue, Jun 15, 2021 at 5:13 AM 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?
Unfortunately "need to send mail" is not well defined..
a) does it need to talk to smtp/smpts/submission ports ? then your
smtp daemon needs to socket activate properly
b) Needs to execute the sendmail binary ? your sendmail command must
queue your messages for "later",
Otherwise your service must start after any of this services but not
want any of them, bad news is it will race anyway and your app still
shouldn't care about what daemon or not is handling the email so goto
a)
More information about the systemd-devel
mailing list