I installed Postfix and configured it to be a network server, not just listen on the loopback network (“localhost”)
$ git diff main.cf
diff --git a/postfix/main.cf b/postfix/main.cf
index bd0aea8..fb28e96 100644
--- a/postfix/main.cf
+++ b/postfix/main.cf
@@ -131,8 +131,8 @@ mail_owner = postfix
#
#inet_interfaces = all
#inet_interfaces = $myhostname
-#inet_interfaces = $myhostname, localhost
-inet_interfaces = localhost
+inet_interfaces = $myhostname, localhost
+#inet_interfaces = localhost
When that is done, Postfix crashes at start up.
Bug reports about this have been opened and not fixed since 2014.
Reported 2014-07-06
https://bugzilla.redhat.com/show_bug.cgi?id=1116538
Reported 2017-11-06
https://bugzilla.redhat.com/show_bug.cgi?id=1510158
Reported 2021-12-10
https://bugzilla.redhat.com/show_bug.cgi?id=2031189
Ultimately this issue all comes down to this:
# systemd unit file comes from the postfix RPM.
$ rpm -qf /usr/lib/systemd/system/postfix.service
postfix-3.6.4-1.fc36.x86_64
# File has not been modified.
$ rpm -qV postfix-3.6.4-1.fc36.x86_64 | grep -c /usr/lib/systemd/system/postfix.service
0
# Section of the unit file with the issue
$ grep After= /usr/lib/systemd/system/postfix.service
After=syslog.target network.target
Because of that, Postfix is started when network.target is reached but network.target is reached before the LAN/WAN network interface becomes ready so Postfix crashes due to no LAN/WAN network interface being available to listen on.
The work-around is to create a systemd override changing the After=
to be one that is reached after the LAN/WAN network interface has been prepared. The package maintainer has claimed in the bug reports that doing so will damage the system but many people resort to doing it and do not have damaged systems.
I don’t understand the package maintainer process process. Postfix is not a trivial package, Postfix was created at IBM and IBM owns Red Hat. If you google for most popular MTA
you will see it Yet this Postfix systemd configuration issue has been reported since 2014, about 8 years. Is it that the package maintainer does not actually use the software they are maintaining?