So you want to host your own Linux mail server…
UPDATE: There is now a HowTo on setting up SpamAssassin to train across all the mailboxes on your server here.
UPDATE 2: Do not sign up with RedwoodVirtual as a hosting company right now. There customer service sucks. See this post.
For the past couple of years, I hosted my personal domain through a Windows hosting company, CrystalTech.com. They provided mail services via SmarterTools’ SmarterMail 2.0.
CrystalTech’s SmarterMail implementation provided 250 mail accounts, a slowish Web-mail interface, IMAP or POP mail client access, virus scanning, junk mail filtering and content filtering for about $16.95 per month (incl. Web hosting for the domain) and $5 per month per 50 MB of space.
Several events led to me to consider a change. First, I’ve always had trouble using POP with Microsoft Outlook from multiple computers. The read/unread state of mail was never synchronized across systems. Every once in a while, Outlook would download my entire mailbox as new messages – creating duplicates for every message that required an add-in tool to remove. Eventually, I switched to IMAP to avoid these problems.
Unfortunately, IMAP and Microsoft Outlook don’t work very well. Microsoft spends most of its time making Outlook work well with Exchange Server. As I wrote in Microsoft’s Sacred Cash Cow, my Windows XP system at work was crashing regularly at work. Once I stopped using Microsoft Outlook 2003 and replaced it with Mozilla Thunderbird – my Windows XP system stopped crashing.
Once my colleague, Kellan, set up a Linux Debian server to host our Groundspring Seattle office's email, Thunderbird and IMAP worked amazingly well. Unfortunately, CrystalTech’s SmarterTools doesn’t work very well under IMAP with Thunderbird. Furthermore, as I added accounts for other family members, the disk space limits we’re starting to add up.
I wanted an unlimited depository for my email. I wanted more control. I wanted the potential to create a more searchable index for my email over time.
So, Kellan suggested I consider hosting my email on my own Linux Debian server. He pointed me to RedwoodVirtual. RedwoodVirtual provides virtual Linux machine hosting for as little as $100 per year (prepaid). Essentially, they provide you a shared server that appears to be a standalone Linux installation e.g. you have root access, unfiltered access to the Internet, etc. Most importantly, RedwoodVirtual provides 2 GB of hard disk space as part of its base package. The promise of unlimited mail storage was at hand.
The only problem it seemed is that I wasn’t a Linux system administrator. Yet, with some early guidance from Kellan and some helpful instructional scripts he’s gathered from around the Web, I had my mail server up and running in a few hours – working almost exactly the way I wanted it within a few days.
The configuration I’ve set up is:
Linux Debian + Postfix + Courier + Apache + SquirrelMail + Amavis + SpamAssassin
I haven’t yet finished my Clam Anti-virus configuration.
My primary concerns at this point are data robustness. RedwoodVirtual does not provide tape backup. They only have a high reliability RAID drive. So, it will be important for me to backup my mail to my local system. I can have Thunderbird do this on my desktop Mac by downloading the contents of IMAP folders. And/or, I can set up a script to regularly rsync my maildir folders to my home hard drive.
Some of you may ask why I don't use GMail more - they can't host my domain - but they do offer the opportunity to archive 1 GB of mail. I don't like the GMail Web interface for primary work. And, it turns out there are legal privacy distinctions for mail hosted on a shared Internet server e.g. Yahoo, Hotmail or GMail and mail hosted on your own server. I'm presuming my virtual machine at RedwoodVirtual is considered my private email as it is hosted on my own domain - though I could be wrong on this. Anyway, according to Jason Schultz of the Electronic Frontier Foundation (I interviewed him for my recent article, Citizen Microsoft), if John Ashcroft wants my GMail - he only need write a memo to get mail older than three months. Yet, if John Ashcroft wants email on my personal server, he must obtain a search warrant signed by a Judge.
I was able to move my mail hosting off of a Windows 2003 SmarterMail 2.0 platform and go entirely open source for less money, with nearly unlimited mail storage. I hope this helps others make similar moves toward better technology that provides more control over their email. There are new possibilities open to me now for managing my mail that weren't available with a closed Microsoft applications platform.
It's a credit to the progress of open source software that I'm able to install my own free mail server within a few hours. Although, there is still work to do to make this easier and more well documented.
I was most impressed that it only took three minutes under Debian to install Apache and SquirrelMail before I was off and running with Web mail. Kick ass!
Continue to the installation guide..
I also picked up a few O'Reilly books to help get me up to speed with Linux...
- Linux in a Nutshell
- Running Linux
- Essential System Administration Pocket Reference
- Essential Postfix: The Definitive Guide
I couldn't find any Debian books at Barnes & Noble but here are two as well: