Chapter 4 · Essential System Services·v1.0.0·Updated 7/6/2026·~9 min
What's changed: Initial version (topic 1.09, subtopics 1.09.1–1.09.3)
4.3Mail Transfer Agent (MTA) Basics
Key points
Learn on-host mail delivery basics: the MTA role and major implementations (postfix, exim), system-wide forwarding in /etc/aliases applied with newaliases, per-user forwarding via ~/.forward, and the mail and mailq commands.
cron results and system warnings have long been delivered as local mail to root. The MTA (Mail Transfer Agent) handles this. This subtopic is not about building full mail servers—only on-host delivery and alias (forwarding) configuration.
4.3.1MTAs and basic delivery
- An MTA accepts and delivers mail (SMTP, port 25). Major ones: postfix (today's de facto standard) and exim (traditional on Debian). Knowing they exist and what they do suffices—their configuration is out of scope (explicit in the official range).
- Test with the mail command (
echo "body" | mail -s "subject" root); check the pending queue with mailq (find stuck mail).
4.3.2Aliases and forwarding
- /etc/aliases is the system-wide alias/forwarding table (
root: admin@example.comsends root's mail to the real admin). Run newaliases after editing to rebuild the database (skip it and nothing changes). - ~/.forward is per-user forwarding—drop a file with the destination in your home; no root needed.
- Division: system/role-account forwarding = aliases (admin work); personal forwarding = .forward (the user's own work).
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.

