The solution
In 2013 Daniel Patterson was six months into a reluctant move to Gmail. He had tried the so-called Gmail replacements — the last was Fastmail — and each missed something he needed: the same mail on several machines he controlled, a phone that only alerted him to important mail, thread organization, tags rather than folders, and good search. Gmail had all five, but it meant handing an advertising company most of his personal and professional correspondence, with no meaningful way to sign or encrypt mail and no lightweight programmatic access.
The obvious alternatives had already failed on at least one requirement, usually tags. Instead of accepting a hosted product that bundled features with an ad business, Patterson spent several months assembling open-source pieces on a five-dollar-a-month Debian VPS: Exim4 and Courier-IMAP as the mail server, Spamassassin with Pyzor for spam, notmuch as the mail database, afew for automatic tagging, Emacs as the desktop client on every machine, and K-9 Mail on his Android phone.
The design separates the mailbox model from the delivery channel. Every message is delivered into an Archive folder that is never pushed to the phone; afew tags each arrival and moves anything tagged important into an Important folder whose IMAP push is enabled in K-9 Mail. notmuch holds tags and full-text search and syncs read state two ways, Emacs clients reach the database over SSH, and spam is tagged rather than deleted so it can always be recovered with an exclude flag turned off.
After the guide was posted on June 29 it drew 464 points and 215 comments on Hacker News in a day. Feedback pushed Patterson to replace Exim with Postfix and Courier-IMAP with Dovecot by the July 9 addendum — Exim's security history and Courier's complexity were the stated reasons — and he removed incron in favor of procmail delivery. He had already switched to the system as his primary mail setup, and his conclusion was that it was more powerful than Gmail and completely controlled by him.
What it achieved
Keep tags as the mailbox model and demote IMAP folders to delivery routes: only messages tagged important are pushed to the phone
Why it worked
Tags, not folders, were the model: notmuch let one message carry many tags, while IMAP folders existed only to decide what the phone pushes.
Only the Important folder had push enabled, so notification routing became a whitelist built from rules instead of contacts.
Pyzor's collaborative message digests approximated the network-trained spam filter that gives a big provider its edge, without collecting anyone's mail.
Keeping everything on his own server made signing, encryption, programmatic access, and two-way read state features instead of missing ones.
What can be applied
When a hosted product bundles what you want with a model you reject, rebuild it from open parts, and split the data model from delivery so attention routing stays yours
Aftermath
Patterson wrote that he had switched to the system as his primary mail setup and that the result was more powerful than Gmail while completely controlled by him. The guide drew 464 points and 215 comments on Hacker News on the day it appeared. Within ten days he published an addendum replacing Exim with Postfix and Courier with Dovecot — citing Exim's security history and Dovecot's simplicity — and dropping incron for procmail-based delivery.
FOLLOW THE EVIDENCE
The sources
- A Hacker's Replacement for GMail dbpmail.net
- A Hacker's Replacement for GMail — Hacker News news.ycombinator.com