Stories
Slash Boxes
Comments

News for nerds, stuff that matters

The Book of Postfix

Posted by timothy on Wed Jun 29, 2005 03:15 PM
from the danny-boy dept.
danny writes "Do you run a mail server using Postfix? If so, then you should check out the latest addition to my book reviews, a look at Hildebrandt and Koetter's Book of Postfix." Read on for the review.
The Book of Postfix
author Ralf Hildebrandt + Patrick Koetter
pages 464
publisher No Starch Press
rating 9
reviewer Danny Yee
ISBN 1593270011
summary understanding and implementing Postfix mail systems

When The Book of Postfix arrived, I jumped straight to the chapter "Understanding SMTP Authentication", since that was something I wanted to get working. This explains the problem -- how to allow travelling users with unknown IP addresses to send mail through a mail server without opening it up to spammers -- and clearly lays out the options: SMTP-after-POP or -IMAP, SMTP authentication, certificate-based relaying using TLS, or some kind of VPN. "If you want something simple, independent, and secure, SMTP AUTH is probably for you."

The remainder of the chapter explains how to set up a backend for SMTP authentication -- a choice between saslauthd and other options -- and the following chapter then explains how to configure Postfix to use it. This approach is typical of The Book of Postfix, which tackles many topics with paired chapters, the first covering background, theory and any ancillary systems and the second covering the actual Postifx configuration. It also emphasises progressive implementation accompanied by testing, which is most reassuring when modifying production servers.

Other chapters in Part III, "Advanced Configurations", cover running Postfix chrooted, using TLS (two chapters), mail gateways and multiple domains. There's also a chapter that works through building a complete mail system for an organisation. Part IV covers tuning and the appendices cover installing Postfix (for Debian or Redhat Linux, or from source) and troubleshooting.

Moving backwards, the hundred and twenty pages in part II cover content controls. Some basic postmaster background is followed by pairs of chapters on each of message transfer restrictions, built-in content filters, and external content filters. I've been working through these, improving my anti-spam controls, and they're proving really helpful; my next step will be implementing amavisd-new.

Part I explains how to set up a host to run Postfix, with ancillary services such as DNS, NTP and syslog, then how to set up a simple single domain configuration, either on a permanently connected machine or on a dialup machine. It then gives a brief description of Postfix's basic anatomy. Part I is concise -- just fifty pages -- but it offers everything most people will need for a basic setup.

There's no cruft in The Book of Postfix: it's a fairly chunky book, but none of it is padding. Excerpts from configuration files include just the right amount of context and the diagrams (and a very few screenshots) are integrated with the text and tightly focused. Given the scope, it's probably overkill for basic Postfix users, though the first fifty pages would make an excellent "getting started" guide for them.

There are some omissions. There's no general explanation of how the master.cf file works, for example, or of rewriting -- neither "masquerading" nor "canonical" appear in the index or glossary. The "Anatomy of Postfix" chapter could definitely have been more comprehensive.

How does The Book of Postfix compare with the O'Reilly book Postfix: the Definitive Guide ? The Book of Postfix is nearly twice the length and provides much more detailed step-by-step explanations and more on ancillary systems -- it explains how to set up backends for SMTP authentication, for example, rather than just telling you that you need one.

I highly recommend The Book of Postfix to anyone using Postfix and wanting to do more than the basics with it.


Danny Yee has written over 800 other book reviews. You can purchase The Book of Postfix from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Dumb Question... (Score:5, Interesting)

    by creimer (824291) on Wednesday June 29 2005, @03:18PM (#12944577)
    (http://www.creimer.ws/ | Last Journal: Friday January 26 2007, @12:40PM)
    Why are mail servers so needlessly complicated? Seems like you have to be a PhD Rocket Scientist to change the most simplest thing.
    • Re:Dumb Question... (Score:5, Insightful)

      by bizard (691544) on Wednesday June 29 2005, @03:23PM (#12944629)
      Because mail servers are more accurately mail _systems_. Complex interactions between local and remote users, spam and virus filters, strict adherence to standards and allowances for broken implementations of same and most importantly (and hardest to deal with) proper dns configuration and lack of same. Nobody wants to lose any mail, so you have to work with 30 year old mail servers just as easily as last months latest rev.
      [ Parent ]
    • Re:Dumb Question... (Score:5, Informative)

      by toxic666 (529648) on Wednesday June 29 2005, @03:28PM (#12944698)
      Mail servers (I use postfix as a filtering gateway to an Exchange system) are not "needlessly complicated". They are quite easy to set up if all you want are basic, secure mail services.

      However, if you want added functionality, security, filtering, spam / virus control, you need to understand what you are doing if you want to use an open source *nix-compatible mail server.

      If you just want something "easy" (read: click and drool), expose Exchange to the Internet and pay through the nose for security software that is behind the times.

      If you understand how the internals of a richly-functional mail server work, you too may achieve >99.99% spam and virus filtering with 0.0001% false positives. And do it much cheaper.
      [ Parent ]
      • Re:Dumb Question... by Nailer (Score:2) Wednesday June 29 2005, @08:32PM
        • Re:Dumb Question... by Taladar (Score:2) Thursday June 30 2005, @02:28AM
          • Re:Dumb Question... (Score:4, Insightful)

            by Nailer (69468) on Thursday June 30 2005, @02:38AM (#12948566)
            You need to justify those statements: why does security and ease of use have to be mutually exclusive?

            People assume these things, and I don't think it's warranted. I think the UI for the security is probably just badly designed. Many people would say Windows sets users up as admins because that's easy, and doing things securely would be hard. But is 'type your admin password to continue' like Fedora or OS X uses really that hard?

            [ Parent ]
    • Re:Dumb Question... (Score:4, Interesting)

      by ZosX (517789) <zosxavius AT gmail DOT com> on Wednesday June 29 2005, @03:28PM (#12944704)
      I'll bite.

      Mailservers are complex that is why. Just take a look at Exim to see what happens when a mailserver gets a bit too complex. In Exim you have this whole transport pipeline that the message must pass through before it gets delivered. Along the way you can change headers, filter for spam, virus check and about a million other things including sender id.

      Thankfully (at least in debian) it comes with a script that will do quite a few basic configurations after asking a few questions. Your e-mail needs may not be as complex as others, but when a site needs a an e-mail server to handle 10,000+ e-mails an hour, streamlining and tweaking the process allows things to be much smoother. I admit I am not anywhere near an expert when it comes to SMTP servers, but I can see the value in wanting to make things run smooth and streamlining the process is a part of that.

      Personally, I've found that postfix is pretty easy to set up and maintain compared to other daemons out there. As far as I am concerned, anything has to be better than configuring Sendmail, though I guess it has become a lot more secure over the years.

      I'm sure others will have a lot more to say on this subject.
      [ Parent ]
    • Re:Dumb Question... by Rasta Prefect (Score:2) Wednesday June 29 2005, @03:52PM
    • Re:Dumb Question... by Alphabet Pal (Score:1) Wednesday June 29 2005, @04:08PM
    • Reliability, Security, Spamblocking are hard by billstewart (Score:2) Wednesday June 29 2005, @04:24PM
    • Re:Dumb Question... by zerocool^ (Score:2) Wednesday June 29 2005, @05:02PM
    • Because users need needless complexity too by wsanders (Score:2) Wednesday June 29 2005, @05:04PM
    • Re:Dumb Question... by Cal Paterson (Score:1) Wednesday June 29 2005, @06:52PM
    • Re:Dumb Question... by cloudmaster (Score:2) Thursday June 30 2005, @07:32AM
    • Re:Dumb Question... by hildeb (Score:1) Wednesday June 29 2005, @05:07PM
    • 4 replies beneath your current threshold.
  • by platos_beard (213740) on Wednesday June 29 2005, @03:19PM (#12944594)
    The only reason I'd read the Book of Postfix is if I actually wanted to understand what the heck I was doin'
  • Great timing (Score:3, Informative)

    by stevey (64018) on Wednesday June 29 2005, @03:23PM (#12944627)
    (http://ctrl-alt-date.com/)

    I also reviewed The Book Of Postfix [debian-adm...ration.org] this week.

    I also enjoyed it, and recommended it.

  • Just picked this book up a month ago (Score:5, Informative)

    by DarkFencer (260473) on Wednesday June 29 2005, @03:25PM (#12944656)
    We had been running sendmail as the MTA for our mail gateway (for a medium size university). I had been getting fed-up with sendmail, and have had a collegue raving about postfix for a long time.

    Long story short: This book has let me (in less then a month) not only switch our mail servers over to postfix, but let me do things more efficiently (in terms of stopping spam at the SMTP receive stage) and many other things better then I had with sendmail before.

    I'm not going to make this a sendmail vs. postfix thread, but if you're going to use postfix, this book is a great resource!
  • Grey listing.. (Score:4, Informative)

    by login: (155941) on Wednesday June 29 2005, @03:26PM (#12944673)
    For anyone using Postfix, I would highly recommend setting it up to work with Postgrey http://isg.ee.ethz.ch/tools/postgrey/ [ee.ethz.ch].

    This reduced the spam at our installation by over 80% overnight, and has so far had no complaints of false positive.

    For a detailed explanation of how this works, see here..http://projects.puremagic.com/greylisting/ [puremagic.com]
  • Slashvertisement, but... (Score:2, Funny)

    by inkdesign (7389) on Wednesday June 29 2005, @03:28PM (#12944705)
    ...at least its honest and to the point!
  • Shouldn't that be... (Score:3, Funny)

    by currivan (654314) on Wednesday June 29 2005, @03:28PM (#12944706)
    "You a mail server run Postfix using do?"
  • Missing: advantages of postfix (Score:1, Offtopic)

    by powdered toast dude (800543) * on Wednesday June 29 2005, @03:29PM (#12944711)
    (Last Journal: Wednesday August 11 2004, @09:58PM)
    I'd consider buying a book about postfix if it clearly and objectively outlined the advantages that postfix offers over other MTAs such as exim and qmail. This book doesn't sound like it offers that kind of information for the potential postfix noob.

    I've run heavy-load MTAs under qmail for some time now, and since djb won't bring it in to the current century, integrating all of the new features necessary for today's SMTP world becomes more and more hacky and patchy. Thankfully, gentoo eases it for me by including all of the most useful patches in its qmail ebuild, but some features remain unintegrated or can't easily be done early in the SMTP conversation.

    I'd love to see a simple, objective, and comprehensive comparison made between postfix, exim, and qmail (include sendmail if you like, although I won't use sendmail for admittedly emotional and historic reasons).

    Once you've made the commitment to go postfix, though, this review makes it sounds like this book might be a good resource.

    $0.02,
    ptd

  • From the description (Score:2, Funny)

    by scrow (620374) on Wednesday June 29 2005, @03:31PM (#12944736)
    ..I had hoped that it would be a Hildebrant [brothershildebrandt.com] illustrated guide to Postfix.
  • I am dissapointed. I clicked on this link expecting it to be about Forth or PostScript or HP. Boy was I sadly mistaken.
  • PostFix crosslisted in hardware? (Score:2, Insightful)

    by Viltvodlian Deoderan (877359) on Wednesday June 29 2005, @03:49PM (#12944930)
    Maybe I am just being picky, but it seems a little strange to crosslist a book on mail server/system/whatever software in the hardware section.

    Let's review:
    hardware = something you can kick when it breaks, or, kick to break it
    software = the little 0's and 1's that live in hardware.

  • over 800 book reviews? (Score:1, Offtopic)

    by jspectre (102549) on Wednesday June 29 2005, @03:56PM (#12945006)
    (Last Journal: Tuesday July 08 2003, @01:49PM)
    ok. but can someone please explain to me how someone has all the time to read over 800 books, in-depth, and write a decent review on them all? even at it for a full-time job. hmm...
  • Fewer Open Relays (Score:1)

    by shiller (893451) on Wednesday June 29 2005, @03:56PM (#12945009)
    (http://www.gamelord.de/)
    It should be obligatory to read such a book for everyone who administrates a mail server, because hopefully it helps to decrease the number of open relays out where.
  • by lordsilence (682367) * on Wednesday June 29 2005, @04:05PM (#12945088)
    (http://www.ekero.com/)
    irc.freenode.org #postfix

    Say hello to us in irc.
    We're always happy to help.
  • Mutt (Score:2)

    by water-and-sewer (612923) on Wednesday June 29 2005, @05:03PM (#12945598)
    (http://www.therandymon.com/)
    This post is ancillary to the discussion at hand, but I use Postfix for one reason only: to get mail from my favorite email client (mutt) to my ISP's server, which requires authentication and sometimes encryption. And for that purpose alone, it's a pain in the butt. I see how Postfix is a great program for people running servers or routing hundreds of messages of day. I only need it because Mutt's dogmatic adherence to the Unix philosophy (each tool does one trick and one trick only, but interfaces nicely with other tools) means I need to go through a lot of work to get my mail to the ISP. SUSE made this easy for me, through YAST2, which dealt with all the tricky configuration necessary to get Postfix talking to my server, but I never understood how it worked. When I moved to Kubuntu I was forced to dive into the Postfix config files more deeply than I felt confident doing. I'd love either a mutt patch that provides SMTP-auth capability (whoops, google is my friend: http://www.geocities.com/win32mutt/patches.html [geocities.com] - why isn't it used by default?) or a simple DEB package that provides mini-SMTP-auth capability for people like me that only send out 10-20 emails per day, and always to our smarthost.
    • Re:Mutt by dacarr (Score:2) Wednesday June 29 2005, @05:19PM
    • Re:Mutt by value_added (Score:3) Wednesday June 29 2005, @05:30PM
    • 1 reply beneath your current threshold.
  • yep (Score:1)

    by jefe7777 (411081) on Wednesday June 29 2005, @08:21PM (#12947048)
    "It's a little known fact, but mail servers were the 10th plague that God visited upon the egyptians." -j.d. illiad frazer btw koetter has been a huge help for years with his postfix/cyrus/tls howto on the web.
  • by Neo-Rio-101 (700494) on Wednesday June 29 2005, @08:48PM (#12947198)
    The only reason why I'm even using Postfix at the moment is because Trend Micro went and basically made their whole Interscan Messenging Security Suite co-dependant on it... and since customer wants support, we pretty much have to do what Trend wants in that regard.

    I managed to hack it to work on qmail and qmail-scanner, and it turned out to be much faster than postfix. It's just that Postfix is a safer bet than qmail I guess.

    (DJB, if you are reading this then PLEASE update qmail and try to incorporate other people's patches. Your codebase is slowly being patched to hell and is slowly becoming a PITA to administer. Thanks.)

  • It is Ralf "Ficken" Hildebrandt!

    Don't mod me down, that is his official name - at least for those who know him.
  • Even Wietse complained and said the SMTP section has to be enhanced when we met him. So, don't keep your fingers crossed - it will get bigger still in the German edition.
    [ Parent ]
  • Re:qMail (Score:2)

    by DA-MAN (17442) on Wednesday June 29 2005, @07:25PM (#12946633)
    (http://www.kabewm.com/)
    http://www.qmailtoaster.com/ [qmailtoaster.com]

    This is an easy and simple way to get Qmail going.
    [ Parent ]
  • Re:Hmm (Score:1)

    by pete-classic (75983) <hutnick@gmail.com> on Wednesday June 29 2005, @10:58PM (#12947841)
    (http://hutnick.com/ | Last Journal: Monday March 12 2007, @09:15PM)
    Dear Moderator,

    If you don't understand a post, don't moderate it.

    Postfix [wikipedia.org] is an alternative notation to infix. [wikipedia.org] For example 2 + 5 becomes 2 5 +. So "The Book of Postfix" becomes "The Book Postfix of". Maybe it isn't funny after all, but it isn't a troll by any reasonable definition.

    -Peter
    [ Parent ]
    • 1 reply beneath your current threshold.
  • The Blum book was outdated when it came out. I personally found it extremely superficial and also imprecise.
    [ Parent ]
  • 10 replies beneath your current threshold.