Postfix
Postfix is a complete Mail Transfer Agent (MTA) that is meant to be a replacement for Sendmail. Wietse Venema, who works at the IBM Watson Research Center, wrote the program and released it under the IBM Public License. Richard Blum has targeted this book at Intermediate to Advanced users, but he has enough basic information so that even an MS Exchange administrator with no Unix background can get Postfix running quickly.
The book is broken into three sections:
- Introduction to E-Mail Services and Postfix
- Installing and Configuring Postfix
- Advanced Postfix Server Topics
Part I is a nice overview of email, how to use Postfix, how Postfix
works and a comparison of Postfix and Sendmail. In chapter 3 'Server
Requirements for Postfix' an overview of Unix and Unix commands are
covered along with an introduction to bash,
gcc and make to bring the non-Unix user up
to speed with the tools that they will need.
The chapter on DNS starts by covering the origins of DNS and the
basics of how it works. Blum then gives us an explanation of DNS
records and how to set them up, including the all-important MX (Mail
Exchanger) record. He then gives a brief discussion on how to set up
the resolv.conf, hosts and
hosts.conf files. The chapter concludes with a quick
look at the host, nslookup and
dig programs. This chapter serves as a quick reference
on getting DNS up and running on a Unix box.
Part II is a detailed section that is the heart of the book. How to set up Postfix is laid out in detail from how to install (both from an RPM file and from source), to configuring it, to logging and blocking UCE/UBE.
One of the sections of the book I was drawn to was on how to set up Postfix as an internal and external mail server for the Small Office environment. This could be for branch offices of a large company (such as insurance offices) or for a Small Office / Home Office (SOHO) that does not have a full time Internet connection. Blum explains how to set up the server for dial-up to send and retrieve mail, and how to run the mail server on the same box as your firewall.
The chapter 'Migrating from Sendmail to Postfix' is a short step-by-step on how and what to convert from Sendmail to Postfix. Since Postfix was designed to do this easily the chapter is shorter than might be expected (only 20 pages).
Rounding out Part II is a chapter on the Maildir mailbox format and a chapter on using an external MDA. The chapter on using an external MDA is a good example of why I like this book. Here is the full Table of Contents for the chapter:
- Using MDA Programs with Postfix
- What is a Mail Delivery Agent
- Automatic Mail Filtering
- Automatic Mail Replying
- Automatic Program Initialization by Mail
- Using an External MDA Program with Postfix
- Configuring the
main.cffile
- Watching MDA Programs in the Postfix Log
- The
procmailMDA Program
- Installing
procmail
- The
procmailCommand Line
- User-Defined
procmailActions
- Summary
In this chapter Blum gives a nice quick How-To on
procmail. While it is not a full treatment of procmail it
has enough information to download, compile, install, configure and
run procmail. Coupled with the brief lessons on Unix,
gcc, make and bash in the first
section, an MS Exchange administrator on their first attempt in the
Unix world is provided enough information to get procmail
working as the MDA for their new Postfix MTA.
Section III covers advanced server topics including using MySQL,
OpenLDAP and Majordomo with Postfix. Like the section on
procmail, Blum covers installing and configuring each of
these applications and how to make Postfix work with them. Chapter 20
covers POP3 and IMAP, which then leads nicely into the next chapter on
SqWebMail. The final chapters are on performance tuning and
troubleshooting.
Overall I have found this to be a well-written book that addressed several questions that I had about configuring and using Postfix (such as the SOHO section). It is clear, direct and covers each topic to a level that I found comfortable. For some people this book will be too advanced but that should not be anyone who has a working knowledge of mail servers or of Unix. I would recommend this book for someone who has started to use or wants to migrate to using Postfix.
My major complaint about this book is the price, $49.99. As much as I liked this book, 'Practical UNIX and Internet Security' was more densely packed with information and only cost $39.95.
Table of Contents- Introduction
Introduction to E-Mail Services and Postfix
- E-Mail Services
- Postfix Services
- Server Requirements for Postfix
- DNS and Postfix
- SMTP and Postfix
Installing and Configuring Postfix
- Installing Postfix
- The
master.cfConfiguration File - The
main.cfConfiguration File - Postfix Lookup Tables
- Using Postfix
- Using Postfix as an ISP Mail Server
- Using Postfix as an Office Mail Server
- Postfix Server Administration
- Migrating from Sendmail to Postfix
- Using the Maildir Mailbox Format
- Using MDA Programs with Postfix
Advanced Postfix Server Topics
- Using MySQL with Postfix
- Using OpenLDAP with Postfix
- Using Majordomo with Postfix
- Using POP3 and IMAP with Postfix
- Using SqWebMail with Postfix
- Performance Tuning Postfix
- Common Postfix Problems
You can purchase this book at Fatbrain.
I personally like Postfix because:
If your needs are simple, and you need only set up a DMsomehost.to.forward.to entry for Sendmail, Sendmail's easy to configure, but things instantly get a whole lot hairier.
And I've never had good success with EXIM, and every time I've configured qmail it has been a hassle.
It seems dangerous to compare Postfix to qmail; spectacular flame wars have broken out between the respective authors...
If you're not part of the solution, you're part of the precipitate.
Um:
Part II is a detailed section that is the heart of the book. How to set up Postfix is laid out in detail from how to install (both from an RPM file and from source), to configuring it, to logging and blocking UCE/UBE.
Devoting an entire chapter of a book to blocking spam sounds like a nice idea, but one of the many things postfix gets right is its ability to effectively and easily block spam for you. With only a few configuration directives in /etc/postfix/main.cf, you can make postfix:
I bet there's more that I've forgotten about (or not discovered yet). Every single item in this list can be implemented with one directive in /etc/postfix/main.cf; postfix is very easy in this regard.
I would think, given postfix's very easy means of setting all this stuff up (and the in-depth documentation that it ships with), that it would be a waste to devote more than a few pages to spam blocking when discussing this mail system. It won't relay by default (so there goes the most commonly used gaping hole for spammers right there), and by turning on features that limit DoS-type attacks and spamming runs, you catch all the clueless spammers. By including the RBL, you catch the more sophisticated ones. Sure, spam's gonna get through no matter what you do, but it won't be postfix's fault.
This book looks to be a clear, concise discussion of postfix's other, more interesting features. I'm glad to see a whole section devoted to getting postfix working with OpenLDAP, for example. Honestly, I think that sort of thing is more important than spam catching in the first place; sure, a user might have to delete a few spams if you haven't spent all the time you should on spam catching, but you might well have more free time if you manage to integrate all your authentication and account management into an LDAP directory that postfix can directly use for its users and configuration.
Just some random thoughts from a humble system administrator :)
Read my stuff.
There have been a few reviews on the Postfix mailing list of the book. The overall recommendation is: The book is not as good as the mailing list, but better than the docs. It doesn't maintain consistency throughout, and has a few typos.
Search the mailing list archives for details.
(Yes, I know I should be posting links, but I have now decided to get people to RTFM and learn to search. I am tired of spoon feeding lusers, and need a break).
Quoting Ralf Hildebrandt:
Today "The" book arrived. I flew over the first 11 chapters and found
the following errors/omissions:
b) p 48: What is the "spawn" program?
c) p 32, table 2.2: mail is NOT a queue. It's the mailspool, or a mbox
file, but not a queue.
d) p 31, listing 2.3: column chroot() shows "never" instead of the
default "yes" that I know.
Quoting Jeffrey Taylor:
It is more tutorial than reference. However, it repeats running
postmap everytime a new map is introduced and telnet sessions for most
forms of sender/relay/spam restrictions. THis makes in a reference
where you may not have read the previous examples. It gets tedious in
a tutorial that is read cover to cover.
IMHO: It is worthwhile, I'm not unhappy I bought the book. It feels
padded (see above). It is beginner thru intermediate, not much
advanced or tricky. I found it more useful than the docs and less
useful (and less over my head) than this e-mail list. I have a small
system, 200-300 messages per day and the chapters on MySQL and LDAP
only served to convince me I don't need them.
e) p 29, figure 2.2 is wrong: Lookup tables interact with the "utility
programs" (e.g. postmap, postalias!)
f) p 97 lists non-RFC conformal command syntax ("RCPT TO:haley"
instead of the correct "RCPT TO: ")
g) p 97ff list lots of bizarre SMTP commands, but the text never
actually tells the read if Postfix implements those. Lots of
bla-bla.
h) p 108 says for "The AUTH command": "The administrator must maintain a
separate username and password database that allows authentication of
remote SMTP clients."
This is not true, it can use any PAM authentication method!
i) p 171 The text for relay_host fails to mention that [] prevents a
MX Lookup of the address/hostname in the brackets!
j) p 174, table 8.1: append_at_myorigin appends (obviously) $myorigin,
not $mydomain
k) p 204, table 9.6 fails to list an all numeric LHS being equivalent
to "OK"
l) p 214 table 9.8 "virtual domain record types" fails to list the
form "@domain @otherdomain"
I can throw myself at the ground, and miss.
I am running Postfix on my machines for two years now and never wanted to use any other MTA. Its documentation is very complete so chances are good that you don't need this book. The FAQ covers most aspects and the rest can be deduced from the manual pages. If you are running sendmail do yourself a favour and take a look at Postfix.
At the beginning was at.