Install Postfix on AlmaLinux 9

A production-focused installation path for AlmaLinux 9.

v2.4Updated 2026-07-20Production guidance
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 swaks

Enable Postfix

systemctl enable --now postfix
postfix status
postconf mail_version

Create 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 postfix

Verify 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]
Search Trushilla Documentation