An easy DIY mailserver

Last Updated on September 30, 2010 by Dave Farquhar

Mail the easy way. It figures that I would find this now, after blowing most of a Saturday trying to get a mailserver set up. This won’t give you any nifty spam filtering, but if you want a fast, reliable, secure, mail server with every other nifty feature you could want, run to Qmail the Easy Way. There, you can download a script that goes and gets all the sources you need and compiles them for you. You get Qmail for SMTP (the fastest and most secure mail server available for Linux), Courier IMAP and POP for receiving, DJBDNS for name resolution, and a nifty Webmail interface. Combine that with your favorite Linux-from-sources distro, and you’ll have a rock-solid, fast-as-possible mail server for a whole lot less money than an Exchange server. And the hardware requirements are far lower. Dan Bernstein, the author of Qmail and DJBDNS, claims Red Hat used a 486 to test Qmail and it performed so well they just threw it into production.
If I had a lot of IMAP clients connecting I know I’d want a Pentium-class machine, but I remember back in the day running Domino under OS/2 on Pentium-90s. When we moved to Domino on NT running on a 533 MHz Alpha, it made our heads spin because we thought 90 MHz was good enough. This was with about 200 people connecting to it. This qmail setup would be a whole lot more efficient than Domino running under NT.

And if you want it all? All you’re missing (possibly) is fetchmail for grabbing mail from foreign mailservers, procmail for a filtering language, and a spamfilter package.
Incidentally, Bernstein writes highly secure, highly efficient software, and he’s really dictatorial about what changes go in it. That’s partly because he guarantees its security–he’ll pay you $5,000 if you can compromise it and he can replicate what you did. Yes, it’s open source, and he gives it away, but since you can’t modify it unconditionally, the BSD people hate him. And since you can’t do anything you want with it except close it, Stallman and his FSF hate him. Since I try to offend the BSD and FSF zealots any time I can, I think that would be reason enough to use Bernstein’s software, assuming it was capable. But it’s not just capable. It’s smaller, faster, and more secure than any alternative and he’s even willing to warrant it–something the likes of Microsoft and Oracle will never do–and you can compile it on any architecture with whatever optimizations you want, and it’s free, so I say you and I are fools not to be using it.

Time to be offensive. It’s been a really long time since I’ve offended people by talking about religion. I was talking with one of my good friends from church (and another part of the conversation reminded me that if I ever decide I want to try to make a living by writing, I need to offer him a job as beg him to be my agent) and we were talking about God’s will. His son had been having some problems, and he was questioning his attitude a little. I understand. My attitude would be similar, and I’d be questioning it afterward too.

I don’t remember what he said, but I paraphrased it back to him to see if I understood what he meant: “I ask for God’s will, but I admit that a lot of times I’m afraid of what God’s will is, and that it might be different from mine.”

“Perfectly said,” he said. (He always says I state things perfectly. I’d better not ever read him that e-mail I wrote at around 9:30 on Wednesday that I’ve been regretting ever since…)

“I know where you’re coming from,” I said. “I’m afraid of it too, most of the time.”

He stopped for a minute and asked if that was OK. I thought about it for a minute. It’s definitely natural to want something different from what God wants. And if you think you might be wrong but want to be right, sure, you’ll be afraid of God’s will. And that’s certainly preferable to being hostile to God’s will, insisting on your way or the highway. You have to reach a certain level of maturity to be willing to ask God’s will, even when you’re afraid of it.

But that’s not all there is. God will take that if it’s all He can get, but what God really wants is unconditional surrender. The Lord’s Prayer says, “Thy will be done.” No strings attached. Jesus prayed, “If it’s possible, take this away from me. But not my will, but Yours be done.” No strings attached there either.
One of us cited Abraham as the human who got as close to that ideal as is humanly possible. But I pointed out how Abraham got there. For 99 years of his life, Abraham didn’t trust God completely, and he did things on his own. At least twice he felt his life was in danger, and he lied to protect his skin and nearly forced his wife into adultery in so doing. We can look back and say, “Abraham! God said he’d make you a great nation! You’re sitting there childless, and Sarah’s not pregnant yet either. Are you a great nation yet? No way! And God’s at least 9 months away from being able to deliver on that promise. You know what, Abraham? You’re invincible! Those guys could try to kill you and they absolutely would fail.” But we’ve got the advantage of hindsight.

At some point, Abraham must have looked back over his life and come to that conclusion himself. Because by the time he was about 110, he unconditionally did anything and everything God told him to do.

I’m convinced that Abraham became the superhero of faith by looking back over his life objectively and being observant enough to see God’s hand in everything, and being far enough along in years to be able to see a whole lot of God’s work, and see that God’s way was good, better than anything he could have possibly put together on his own.

So yeah, I feel bad about being 26 and attaching strings to my surrender. I’ve got a whole book of God’s made-and-kept promises, and I have read the whole thing, cover to cover. But nothing’s more convincing than your own experience, and at 26 I’ve still got some of that to gain. He’s further along than I am in the experience department and in the miracles department–he’s got two kids that no doctor can explain. The second is less than a year old, but if he’s like a cat and has nine lives, he’s already used up two or three.

Hopefully neither of us needs a whole lot more convincing. I think we’ll both get there before we turn 110, but I’m not surprised that neither of us is there yet.

If you found this post informative or helpful, please share it!

6 thoughts on “An easy DIY mailserver

  • October 19, 2001 at 10:17 am
    Permalink

    At various Usenix conferences, we joke about how to tell the Qmail fans from the old sendmail fogeys. The Qmail guy always seems to be a young 20-something with purple hair and piercings ;-> (i.e. "the purple hair crowd")

    Regardless, Dan does write some cool stuff and it’s certainly fun to cheese off the FSF folks, isn’t it ?!

  • October 19, 2001 at 12:24 pm
    Permalink

    Age under 30: check
    Gray hair: check
    Goatee: check
    Long ponytail: negative
    Eye correction: negative
    white shirt: check
    necktie: check
    navy blue pants: check
    piercings: negative
    purple hair: negative
    knows how to root both NT and Unix boxes in an emergency: check
    has written a sendmail.cf file in his lifetime: check
    would find taking the Wolfe battery programming aptitude test again preferable to writing another sendmail.cf file: check
    owns complete set of Joy Division and Sisters of Mercy CDs: check

    Hmm….

  • October 19, 2001 at 10:42 pm
    Permalink

    I’m not offended.. But I always thought that agnostic or at least semi went with the IT career. And if God gives me 110 years I may see every thing His way, until then I figure that He gave me free will for a reason. Besides can you imagine how boring we would be for Him if we always agreed? It’d be like talking to yourself for millenia or 30.

  • October 20, 2001 at 2:35 am
    Permalink

    Do you have kids, Scott? …strong-willed kids?

    Sometimes I don’t know how He puts up with me! But I do try to use what I see of His work with me as a guide to handling my two.

    dan

  • October 20, 2001 at 3:05 pm
    Permalink

    Hi Dan,
    I’ve raised other people’s does that count? And I wasn’t poking fun… well not too much. That’s actually how I see things. And my conscience is my guide, any supposition on who gave it to me?

    Have a better one:-)

  • October 23, 2001 at 7:06 pm
    Permalink

    Hey, it all started with man not following God’s hopes.

Comments are closed.