Slashdot Mirror


Postfix

honestpuck writes "After many years bashing my head against sendmail in all it's gory details I had amassed a fair amount of knowledge and documentation on handling the Mail Transfer Agent (MTA) in Linux and Mac OS X. This caused a fair amount of teeth gnashing when I discovered it had gone the way of all flesh in OS X Panther to be replaced with Postfix." To un-gnash his teeth, honestpuck used Kyle D. Dent's Postfix: The Definitive Guide (published by O'Reilly); read on for his review of the book. Postfix: The Definitive Guide author Kyle D. Dent pages 260 publisher O'Reilly and Associates rating 8/10 - Excellent book, a little thin on details in a few places reviewer Tony Williams ISBN 0596002122 summary An excellent guide to installing, configuring and running Postfix

Fortunately, my first needs were simple and I came to realise that Postfix was a much easier system to install and maintain. Now that my needs are more complex, I was glad when this book hit my desk at exactly the same time as I started upgrading the corporate servers from Mac OS 9 to OS X Server.

Postfix: The Definitive Guide seems to fit the bill. It is a well-written and well-constructed guide to mail systems in general and Postfix in particular. (Oh, and speaking of definitive, could someone at O'Reilly provide a definitive answer to both reviewers and their own editors as to that colon? This is the second 'Definitive Guide' I've reviewed in as many months, and they are sprinkled with instances of each book's title, sometimes including that colon, sometimes leaving it out.)

The book starts with a good overview of the underlying technology in Chapters 1 and 2. I can't blame Dent for my slight confusion in the section on addresses and headers - having RFC822 superseded by RFC2822 was just a little too much coincidence for this particular "bear of little brain." He then follows it with a chapter discussing Postfix's architecture, important since Postfix uses a much more modular approach than the sendmail monolith, with each part of the mail handling process a different executable and the single queue turned into five.

Once the background is well covered, Dent then gets onto the nitty-gritty of configuring and administering Postfix. He has certainly covered everything I needed, including spam handling, multiple domains, relaying, SASL authentication and using LDAP. Once I'd finished grokking all that, and getting it integrated into my servers, I had a corporate email system up in three sites that replaced and improved upon a couple of thousand dollars worth of proprietary dreck. Happy is an understatement.

Dent's writing is sometimes a little patchy, though never bad. The technical detail does seem overpowering in places, though, and I occasionally found myself reading a section through more than once with a configuration file open in front of me. There are certainly spots where a little more hand holding and care with the writing would have been appreciated. (If you are a little more cognizant of the interstices of mail systems then you may not have the same problem.)

I did, however, appreciate the appendices enormously. The four appendices cover configuration parameters, Postfix commands, installation, and an FAQ. My system came with Postfix compiled and installed just as I required it so I didn't get a chance to thoroughly test out Dent's installation procedure (though it looks good); the other three continue to be useful.

If you want to have a look for yourself, then the usual O'Reilly page is complete with a table of contents and index, but this time no example chapter is provided (how come, O'Reilly?). You can also get an expanded version of the FAQ in Appendix 4 from Dent's website. A better example of Dent's writing style is an excellent article on troubleshooting with Postfix logs at O'Reilly's Onlamp.com.

This is an excellent book, Dent has explained the underlying methodology and use of Postfix well, taken the reader through all aspects of this MTA system and explained both the why and the how. I would recommend this book (and, as a result Postfix) to anyone looking for an MTA and a guide to configuring and running it.

You can purchase Postfix: The Definitive Guide from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

5 of 161 comments (clear)

  1. Postfix Enabler by momerath2003 · · Score: 5, Informative

    Mac OS X users can find a cool, donation-ware (read: non-crippleware) GUI for the buil-in postfix server, Postfix Enabler. It allows some advanced configuration of the postfix server.

    It has some handy instructions for setting up Mac OS X's Mail.app to interface with the Postfix server as well.

    --
    I had but a simple dream, to destroy all humans.
  2. Re:Postfix shortcomings by boobsea · · Score: 5, Informative

    Didn't google very well did you?

    here you go:

    http://www.geekly.com/entries/archives/00000155.ht m

    Good luck.

  3. Re:beats the hell outta sendmail... by cayenne8 · · Score: 5, Informative

    Yup...was very new to setting up an email server. I found this thread very helpful for setting up a simple home email system. Also way down in the thread is help and links for using spamassasin and other heuristic spam filters...

    --
    Light travels faster than sound. This is why some people appear bright until you hear them speak.........
  4. Re:beats the hell outta sendmail... by wohlford · · Score: 5, Informative

    I'm a real big fan of Security Sage's postfix configuration. The cover pretty much everything interesting regarding Postfix except LDAP. Jason

    --
    Jason Wohlford
  5. editting sendmail.cf by MrChuck · · Score: 5, Informative
    I've made a LOT of money taking people's old sendmail configs and turning them into managable m4s. Esp when 4-5 system admins have passed through and just made "a little tweak."

    Postfix seems ok, I'd recommend it for folks setting up straightforward machines who didn't know sendmail

    But people whine that "sendmail is too complex" and at the same time they WANT complex things to happen.

    I had a guy come up to me at an event and shout:
    Guy: Sendmail is too hard.
    ok
    Guy: and is there any way to make it only send large (> 1MB) messages out after 7PM when my ISDN rates are lower?
    sure. 5 lines in your m4 file.

    Sendmail.cf is a binary. It is intended to be read and parsed quickly by a binary. Sendmail still runs on 4MB Sun 3 machines. You don't edit /bin/ls to effect a change there, you edit "ls.c".
    Similarly, you edit the .mc file to effect a change in the .cf.

    More, when sendmail changes major revisions (eg. you fianlly move from Sendmail 8.8 to 8.12), you regen your .cf and, barring some minor changes to remove defunct features or take advantage of new ones, you have a new working .cf file. You can't just move a 8.8 cf file to an 8.12 machine and expect it to work well and use new features.

    Having worked on HUNDREDS or THOUSANDS of config files (one set went onto 10,000 machines at a site), there's NOTHING you can do in the .cf that can't be done in the .mc.

    That said, the rule language is painfully ... complex? No, just the opposite. It's painfully simple. My experience with 6502 assm and a BASIC that had neither ELSE nor AND/OR options helped to make me really good at writing sendmail rules.

    Dealing with booleans (just to ruleset^Wsubroutine saving buffer, put time in buffer.
    Is message less than 1MB? then return
    is time after 1900 hrs? Yes? return dsmtp.
    Is time < 700 hrs? Yes? return dsmtp.
    Otherwise just return.
    In calling routine, look for return value and if it's dsmtp, put the saved buffer to the dsmtp mailer. Otherwise continue with the saved buffer.

    Hard? No, not really.

    Painful? You betcha. I'd love to have variables and ANDs and ELSEs. I've taken to putting complex logic in a perl milter at the RCPT TO phase and calling it a day.

    sub choosemailer {
    if ((($time > 1900) || ($time < 700)) && $size > 1MB) THEN $mailer=dsmtp
    }

    But the rulesets are just read by a parser. It's not rocket science (just computer science).

    It would be nice to have (perl) regex's and such built in.

    And that's where Postfix starts to have an advantage. I can live without UUCP for that. I'd just hope that new sendmail versions might rethink the whole language for processing mail. It's good to have competition. (qmail2 also looks promising to raise the envelope).

    But lets just recall that's its not about Sendmail vs postfix vs exim vs qmail.

    It's any of these VS Exchange/Notes/Gropewise. And we're losing.