Categories
Computers

Evolution of a Mail Server

My home network consists of 4 computers- 2 desktops and 2 laptops.  My wife has one of each, both of which are more modern and both of which are Windows machines.  My two machines are the EEE and a desktop which I’ve pieced together from leftover parts from prior desktops.  It’s not a bad machine, it just doesn’t have the most up-to-date hardware.  Still, it’s good enough to make for a good server machine.  My most rewarding experience has been in the world of getting it running as a local mail server.

When I first started out on Debian, I had prior experience with Evolution so this MUA is where it all started for me.  Being green, but mostly unafraid to experiment with the stuff, I stuck with this and had it running with SpamAssassin.  My spam results were pretty poor, so I got it running with Bogofilter next and this proved to be a very effective combination for me.

But then I decided that Evolution was bloated and really unnecessary for my needs.  After all, I was just reading email, so why did I need all that calendar stuff?  So I poked around and eventually decided on the Claws email program.  It took some doing on my part, but I got it running pretty well with Bogofilter, and I even managed to migrate all of the mail from my Evolution setup to the Claws setup.

My next step was to get fetchmail working.  This turned out to be pretty painless as it is documented in so many places around the web that usage of it would have to be pretty arcane to achieve a configuration that isn’t easily duplicated.  Somewhere along the way, I started using Mutt as well.  Mutt further led me to figure out how to setup Exim4 properly as a Smarthost for my setup, since Mutt doesn’t do SMTP.  At this point, I was pretty satisfied with the arrangement because I could check my email from the Wife’s WinXP desktop via an SSH session and Mutt, as well as send email via Claws or Mutt.

Of course, as I continued to evolve in my Linux admin skills, I hit upon Procmail.  I spent some time educating myself and was able to integrate it into my setup so that I was sorting my mail and keeping my Inbox at a manageable size.  It was a big improvement over the filtering interfaces provided by the Claws GUI, since mail was sorted upon delivery.  I also found that I was using Mutt more than Claws as it was much quicker to load, and I found that the RC file was pretty easy to tinker with to tweak the usage.

Well, skip forward and my EEE arrives on the scene.  I set it up with NFS and Samba and, for awhile anyway, I was able to make my email situation work OK.  I could check email from the EEE via filesharing and symlinks but there were little problems with it- like I couldn’t move emails around.  It turned out to be related to a problem with Mutt and Samba which, after searching hi and lo around the web for answers, led me to the conclusion that I needed to change the way I was handling mail.

Enter Dovecot-IMAP.  I chose this because the configuration was consistently rated as the simplest to setup, as opposed to Courier-IMAP.  The big catch here was that I needed to switch my mail storage format from MH to Maildir since Dovecot does not (or did not when I made the switch)  support MH format.  FWIW, the MH format was a holdover from my initial foray into Claws which used MH as it’s default mail format.  I would still be using it today if Dovecot supported it.  In any event, I was able to leverage Mutt, which auto-detects mail formats, to move all my old MH mail to the new Maildir format.

At this point, I realized that I had a real mail server setup and it filled all my needs very neatly.  Fetchmail sucks my mail from my accounts and hands it off to Exim.  Exim then sends it to Procmail which sorts it and then uses Dovecot to deliver the mail into my various folders.  With Mutt running on my EEE I can now check my email without any limitations or hickups.  I went on to install Thunderbird on the WinXP machine and can also check email from there as well without any annoying side effects.  I even setup Exim on my server to act as a local relay, so now I could configure local machines to send mail to the server, which would then handle sending mail to the appropriate SMTP server.

My last step in the process was to convince the Wife to give the new email system a whirl.  I moved all her mail over to the Dovecot server, setup a procmailrc file for her to do spam filtering using Bogofilter and added her mail server to Exim for her outgoing mail.  I even setup her laptop with Thunderbird so she could check her mail from it as well.  She hasn’t had any complaints since.

Leave a Reply

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