[CentOS] systemd alias for SMTP provider (and other services supplied by alternative providers)

Mon Jun 14 09:25:56 UTC 2021
Kenneth Porter <shiva at sewingwitch.com>

I just finished adding a custom service to send an email on system 
shutdown/startup:

<https://github.com/SpareSimian/bootmail>

I ended up coding an After for postfix.service on CentOS 8 so the mail 
would get delivered before the system shut down. (I think I might need a 
delay, too, to allow the message to finish shipping to the monitoring 
server across the network.) I'd like to be able to use the same unit file 
on older systems that use sendmail, and I know there are other packages 
that provide SMTP and local mail. So it would be desirable to have an Alias 
for those services. I'm using CentOS 8 on my latest system and 7 on older 
systems. Is this perhaps already present in a newer systemd commit? Is 
there a registry for well-known aliases for package writers? With 
CentOS/RHEL/Fedora allowing multiple options for several packages through 
its alternatives system, this seems like a natural need.