Idea #3: A Simpler Email Server


A few years ago, I abandoned the simple folksy comfort of shared virtual web hosting in favor of VPS technology. A Virtual Private Server affords all of the luxuries of having one’s own linux box, with (nearly) the same low low cost of shared hosting. You get full root access, with the ability to compile and install whatever software you like, and you usually only pay thirty or forty bucks a month for it.

Ingenious.

When I signed up for my VPS account, I happily installed the latest versions of Apache, PHP, MySQL, Subversion, Perl, Python, Java, and so on. I’m a seasoned techie, and the whole thing was as smooth as butta. I was loving it.

Until the time came to set up my email.

And then I was sad. Very sad.

You’d think setting up email would be simple and straightforward these days. After all, email has been around for more than forty years now, so we’ve had lots of time to figure out the problem.

And there are plenty of unix-y severs that are straightforward (if not simple) to configure. Apache, for example, is a massively complex piece of software. But most of the default configuration options work, right out of the box. And most of the time, it’s pretty easy to customize it to your personal tastes. The documentation is good. And the config files are well commented. Within twenty minutes of installing Apache, most competent linux dudes can have it up and running, serving all sorts of dynamic content.

But configuring sendmail is an entirely different story.

Bear in mind, my server has only ever had to handle email for five different domains, and never more then nine different email addresses.

Yet, somehow, my sendmail configuration file is 2047 lines long, and contains treasures like this:

     # externalize local domain info
     R$* < $+ > $*           $1 $2 $3                        defocus
     R@ $+ : @ $+ : $+       @ $1 , @ $2 : $3                <route-addr> canonical
     R@ $*                   $@ @ $1                         ... and exit

There is not a single human being in the entire world who knows what that means.

In fact, configuring sendmail is so difficult that the fine folks who make SuSE linux have developed their own software to author sendmail configuration files, by parsing data from an entirely different set of config files and then munging all of that data to produce the sendmail config. Yes, you heard that right: config files to configure the creation of other config files.

See, with sendmail, everything is completely configurable. You want to change the format of your SMTP headers? Sendmail will let you.

But that’s dumb. I don’t want to change the format of my SMTP headers. The defaults are a-okay by me.

After much pain and suffering, when my sendmail config was finally correct and I finally thought I was ready to re-join the world of electronic mail, I learned that sendmail actually only sends mail.

Go figure.

To receive mail, I needed an entirely different set of programs.

To make a long story short, I had to compile gnu pop3d and imap4d from source (configure, make, make install). But first I had to get an updated version of libtool. And an updated autoconf. And then I had to install xinetd and set up protocol handlers on the appropriate ports. Then I needed to update the startup scripts in /etc/init.d. Then I had to figure out how to create mail accounts for my users (and let them create their own passwords) without actually granting them shell accounts.

And then I went on a murderous rampage and slaughtered an entire village of Sand People.

Seriously. I’m a clever guy. It should not be that hard.

“But Benji,” I can hear you saying, “What about qmail? What about postfix? Hasn’t the free software world already provided a simpler email solution?”

Ha!! Take a look at this and tell me if you still think qmail is simple.

Sure, it’s simpler than sendmail. But that’s not exactly saying much. And even with qmail, I still need to set up pop3 and imap servers. And I shouldn’t have to install three different pieces of software just for email.

What I’m talking about is a single piece of software that could handle all email-related tasks. It should provide pop3 and imap functionality, right out of the box. It should be possible to perform most admin tasks through a browser interface. And it should take less than twenty minutes install and configure.

I wasted nearly a week of my free time learning how to install and configure sendmail, pop3d, imap4d, and xinetd. Just so that I could send and receive email. In my book, that’s ridiculous, and I would have gladly paid cash money for a piece of software that could have made the whole process seamless.

Developing a Modular Solution

If I were going to develop a mail server, I’d make it as modular as possible. Even basic functionality like SMTP protocol handling would be provided by a plug-in. Additional plug-ins would be responsible for providing protocol handlers for pop3 and imap connectivity. Future plug-in development could support features like MS Outlook connectivity, calendaring, address books, spam filtering, etc.

It would also be interesting to provide a few scripting hooks, so that administrator-defined scripts (in Python?) could be triggered by events in the mail server. (For example, upon receipt of a message to the ’support’ account, the server could add a new record to a customer service database.)

I’d develop the server with a few basic assumptions in mind:

  1. There is no association between unix shell accounts and email accounts. Chances are, the email users will never be required (let alone permitted) to access a shell.
  2. Users will always access their email accounts via a remote protocol. Local access, through a local MUA or through fetchmail, would not be supported.
  3. A well-formed email address must take the form ‘name@domain.tld’. Although sendmail considers something like ‘m’ to be a valid email address, I would disallow it. Even users on the same server should be required to fully-specify all email addresses.

Of course, the RFCs for SMTP and MIME encoding are very complex, and I’d almost certainly have to be willing to deviate from the spec in a few places. After all, protocol complexity is one of the reasons sendmail is so complex. I’m assuming that much of the complexity is due to anachronisms in the spec (like overly permissive treatment of email addresses), but I could be wrong about that.

As far as I can tell, there’s only one significant competitor: Zimbra. But the Zimbra product looks very very good. The feature list is impressive (even for the free version). The Small Business edition (which includes Outlook-compatible functionality) costs a minimum of $1450, though, and I think I could beat that price by a significant margin. On the other hand, Zimbra also includes a really slick AJAX mail client (check out their hosted demo) and I really don’t think I could top it.

If I decide to compete with Zimbra, I have to compete based on server features (which means I would need Outlook connectivity, out of the box) rather than on the features in their webapp.

Pros:

  1. Every business needs email. Small businesses are less likely to have dedicated IT staff who can waste lots of time configuring the email server.
  2. Small businesses are more likely to use a Linux server than a Windows server. There are already plenty of easy-to-configure email servers for Windows, but most small businesses can’t use that software, because it won’t run on Linux.
  3. A modular architecture could facilitate some very cool plug-ins, like Python scripting. This could be a major differentiating factor.
  4. I could probably compete with Zimbra (Small Business edition) on price, while still generating a reasonable amount of revenue per license. With a $250 price tag, I’d have to sell about 20 licenses per week to generate $250,000 in annual revenue.

Cons:

  1. The SMTP and MIME specifications are very complex. If I can’t find a good library to handle parsing and networking, I’ll be in for a long and error-prone development process. Even if I can find good libraries, it would take a long time to develop a full-featured mail server. I don’t know if I want to spend that much time getting a product to market.
  2. Although sendmail, qmail, etc are complex, they are already well-known quantities. They’ve demonstrated that they’re secure and robust. Hard-core industry professionals are unlikely to abandon them, even for a simpler product.
  3. Zimbra would be a very attractive alternative. Even their free product seems very feature-rich. I’d have to offer a more compelling server product, specifically targeting the features in their Small Business edition, because I probably wouldn’t be able to develop a better mail client than the AJAX web client they’ve developed.

This is the third of 30 business ideas that I’ll be writing about over the course of 30 days. Some of the ideas are simple and elegant. Some of them are so complex, I’m likely to lose what little remains of my sanity just contemplating them. One of them will become a product over the next six months, and the foundation of my new software business.

11 Responses to “Idea #3: A Simpler Email Server”

  1. Some semi-anonymous fella Says:

    I developed a POP3 server in a couple of days, and made a start on an SMTP one as well. Basically they’re both state machines, so once you’ve figured out how to write a generic state machine the rest isn’t so much work. Yeah, MIME would be a pain :-) but happily I did not need to deal with that. Making it scale would be… interesting.

  2. Chris Davies Says:

    I think you’d make a grave mistake seperating the mail users database from the underlying unix password database. Doing so greatly limits the options you have for authentication, and greatly increases development time.

    For example, many small shops might keep their users in Window’s active directory, and use pam_ldap on the linux side. If you aren’t using PAM, then either you need to independantly support LDAP or you alienate a whole chunk of your audience.

    Ditto for about a whole bunch of other auth options….

  3. Artur Sowinski Says:

    From what I found out during seting up server box some time ago, Exim mailserver for ‘nixes is the most pain free – http://www.exim.org/ and for windows enviroment hMailserver (it’s OSS) is easy as any install dialog on windows :) http://www.hmailserver.com/

  4. Vladimir Dyuzhev Says:

    I don’t see logic here. First you target (let’s call it so) “simplicity of install”, and then you conclude you’ll need to compete on features (i.e. make it complex). No need to do it. Most people who install their own server do not need calendaring or MAPI, for instance. Make simplicity of install (”30 seconds to up and running”) your selling point, and you’ll definetely find your niche. The question is how big a niche.

    Having said that, I guess making yet another mail server, especially for geeks (who can and often proud to be able to configure things themselves) must be a bad idea.

  5. Ben Bryant Says:

    Yeah I think one feature such as Outlook connectivity could be the thing that brings in customers. With something like this, just one significant differentiator from Zimbra together with the price point could get you your 20 customers per week. I do not think the concept of modularity in and of itself will get you any customers — I expect that’s the sort of thing that excites open source programmers more than administrators.

  6. Stu Says:

    I’m not sure about your Pro point 2 – I’d hazzard a guess that the reason there are so many more windows based mail servers is because there _is_ a much larger small business market compared to linux.

  7. Ryan Says:

    Why not just build a better configuration engine for one of the mail servers out there? There’s no need to reinvent the wheel for SMTP and local mail delivery. For example, Postfix has a wonderful internal architecture, but its configuration files are still pretty complicatied. If you could create a good* web or desktop interface to configure an existing email application, you’d save yourself a lot of time, and reduce the chance of exposing your customers to security vulnerabilities.

    Ryan

    * Webmin is not a “good” interface. It’s ugly, and written for Unix system administrators. I’d think a product with simple terminology and a straightforward object model would be most likely to succeed in the market. If you have to ask a very technical question, see if you can eliminate the need for that question (infer the answer or make a one-time decision yourself) or else provide an easier-to-understand explanation about what the concepts mean. We could all do a lot better than Webmin.

  8. Rajesh Kumar Says:

    If you are targetting for simple small business, many i know of uses the $499 SBS where MS throws in free Exchange server capability.
    Its OS plus all other stuff.

    Another point is why will a non-techie small business owner be bothered with linux based systems or hire a “Guru” on a retainer.

    Price point wise selling your s/w over $250 might be difficult i guess.

  9. Anon Says:

    You’ll also be competing with googles (free?) gmail for domains. For a company that doesn’t mind letting google hold all their email, it’s a nice, pain free solution. Of course, it’s still in beta so who knows what their final pricing structure might be.

  10. benji Says:

    In fact, Anon, I actually use the gmail for domains beta for my own email. I signed up for it a month or two ago, and so far, I’ve been really happy with it.

    After fighting with sendmail (and a hosting company with flaky uptime) for two years, it was a huge relief to move all email-related functionality off my server entirely.

    Thanks, everyone, for the feedback. I’ve got to admit that this is one of the weakest of my 30 ideas. It’s hard (though not impossible) to make a compelling case, from either a marketing perspective or a technical perspective.

    But, nevertheless, it is something I’ve thought a lot about over the last few years, so I decided to put it out here anyhow.

  11. Anonymous Says:

    A big con: small businesses may not have IT staff, but they can and should have an ISP that does their email for them. Last I heard, most do.

    The market is people who want to run their own mail server, but haven’t already either spent the week figuring out existing software or just purchased an account where the hosting company manages the email servers. That feels small and hard to reach, to me. Where will you find a thousand people (per year) who’ll buy this at $250? Writing an email server is easy. Figuring out how to market an email server, now that’s hard. ;)

    Also, if you want to run your own mailserver, having redundant systems (ideally on a UPS and redundant network connections) is also important. Which, actually, raises an interesting question: would that be the additional feature that makes this a great product? How well is failure handled by pop3d and imap4d and their friends?

    Btw, authentication should be modular, even inside the app, so you can start with ’simple’ built-in authentication, but expand to include links to system accounts, LDAP, etc. It ought to be a “30 seconds from install to serving email for every account on the system”, because for a lot of little easy-install servers, figuring out where the passwords go is one of the trickier bits that always annoys me.

    Still, even if this is a weak idea, the analysis of the marketing and business side is already more detailed and useful than 99.999% of all software development blogs out there, and I *really* hope you’ll keep that up. That’s the really itneresting bit of this series, to me, at least.

Leave a Reply

You must be logged in to post a comment.