Install Postfix on AlmaLinux 9
A production-focused installation path for AlmaLinux 9.
Production note: Back up configuration, run
postfix check, and stage changes before reloading.Prepare the server
Set a stable hostname, verify forward and reverse DNS, update the system, and document the intended role before installing packages.
hostnamectl set-hostname mail.example.com
dnf update -y
dnf install -y postfix cyrus-sasl cyrus-sasl-plain swaksEnable Postfix
systemctl enable --now postfix
postfix status
postconf mail_versionCreate a safe baseline
postconf -e "myhostname = mail.example.com"
postconf -e "mydomain = example.com"
postconf -e "inet_interfaces = all"
postconf -e "inet_protocols = ipv4"
postfix check
systemctl reload postfixVerify operation
Use postconf -n, inspect journalctl -u postfix, and perform a controlled SMTP test with swaks.
swaks --server 127.0.0.1 --to [email protected] --from [email protected]