Debian and qmail

I spent about 8 hours yesterday and another 3 today setting qmail up on a Debian server of mine. This was my second time installing qmail (the first was on OpenBSD) and interestingly enough, it was way worse. I could end this post right now and say that even though qmail runs pretty nicely, setting it up is a major pain in the ass and Dan Bernstein is particularly evil for making an MTA that’s good enough that people will jump through fiery hoops in order to configure properly, but I’m hoping that my experience might be of value to someone else in the future, so I’ll continue.

Before I even start, if you ever want to install qmail (and I suggest you think about that before answering), you will want to read Life with qmail, which is an incredible resource. If you follow it step-by-step you should run into very few problems, if any.

The first problem I ran into was expected – I’d run into it previously when trying to install djbdns and daemontools. The problem is this: most of djb’s software won’t compile on any relatively new version of the GNU C compiler. It’s all due to a bug in his code that was previously overlooked by the compiler but it’s not anymore and he hasn’t updated his code. When I ran into this problem with djbdns my solution was to grab the Debian source package which includes a fix and build that instead of the source from djb’s page itself (djb’s licensing does not allow binary distributions, so you have to build it all from modified source). Things didn’t work out quite as nicely with qmail, as I quickly realized that the Debian package is horribly broken and won’t even start properly due to some pesky permissions issues. In some of the most frustrating debugging I’ve ever had to do, I came across such descriptive errors as “alert: cannot start: unable to open mutex” (a permissions issue), and my all-time favorite error message: “alert: cannot start: hath the daemon spawn no fire?” (I think this happens when qmail-lspawn and qmail-rspawn can’t be started, which I also attributed to permissions issues).

After messing around with this for a while I decided to throw it all out and start from scratch using netqmail, an improved and patched version of qmail 1.03. I followed the instructions from LWQ and had qmail up and running shortly after. I ran into a couple of snags that I’ve attributed to an improperly configured firewall and some DNS propagation issues, but they were minor and pretty much fixed themselves.

This all left me pretty pissed off in general. It’s not for nothing that I went through all of this though. Once qmail is up and running it’s pretty much hands-off, and it lets you use nifty stuff like ezmlm. It’s actually because of ezmlm that I decided to re-install qmail – I’ve been using Google Apps to manage e-mail for all my domains and for most purposes I swear by it.

This entry was posted in Rants, Technology and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>