What's changed: Initial version (topic 2.10, subtopics 2.10.1–2.10.2)
4.1Configuring and Managing Postfix
Learn how Postfix (an MTA) is configured: the split between /etc/postfix/main.cf (runtime parameters) and master.cf (service/daemon definitions), address rewriting via /etc/aliases, the queue layout under /var/spool/postfix/, checking logs, SMTP authentication (SASL) and TLS encryption, the basics of the SMTP protocol, and where exim fits as an alternative MTA.
Email works through a division of roles: sending (an MTA), receiving and delivering (an MDA), and retrieving (an MRA). Postfix fills the MTA role and is the most widely deployed mail transfer agent on Linux. Rather than memorizing settings, having a map of "which file decides what" is the shortcut for both real work and the exam.
4.1.1main.cf, master.cf, and aliases
- Config files live under /etc/postfix/. main.cf holds the daemon's runtime parameters (accepted domains, relay permissions, TLS settings, etc.) as one parameter per line. master.cf is a table defining which services (smtp, submission, pickup, ...) run as which processes.
- Redirect destinations via /etc/aliases (e.g.,
root: admin@example.comforwards mail addressed to root). After editing, you must runnewaliases(orpostalias) to rebuild the hashed database—without it, the change has no effect. - Mail is not always delivered instantly—it passes through queues under /var/spool/postfix/ (incoming, active, deferred, hold, corrupt, etc.). Inspect or force-flush stuck mail with
postqueueandpostsuper. - Runtime logs land under /var/log/ (often
/var/log/maillogor/var/log/mail.log, or viajournalctlon systemd-based systems), and are the first place to check for delivery or authentication failures.
Continue reading — free sign-up
You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.

