The transition was quick, and also (so far) seemingly painless.
The server is an old Pentium II 233 machine that sits between my home
LAN and the internet, and have sitting there, and running night and day
since 1999. For the first two years it was running SuSE linux, but
since 2001 it has been running debian and been continously upgraded. It
was originally installed with potato, but have been apt-get
dist-upgrade'd to woody, and then to sarge, and then etch, which is what
it's currently running
I've been using cyrus imapd since 1999 (compiled by hand on SuSE and
using the debian packaged version on debian).
But in all these years I've never become really friendly with it. In
the years leading up to 1999 I had been running UoW imapd at work, and I
wasn't too impressed with it at that point in time. The alternative
choices were courier and cyrus, and I picked cyrus more or less
arbitrarily.
By "never become really friendly", I mean
- I've never really gotten a good understanding of the configuration
- I've never quite understood what the documentation have said about
authentication and SSL support. I've gotten things to work by trial
and error
- Four times the seen data bases have become corrupt. Two times during
upgrades (one of them after I had switched to skip lists), and two
times on their own, while I was still running BDB
- Since delivery was to a central spool and database, owned by user
cyrus, has meant that I had to use sieve (which is another thing I've
never quite understood) for mail filtering, instead of dear old
procmail
Cyrus has lots of stuff related to scaling and having mailboxes for
users that have no users on the host, but that's not really relevant to
my home server.
Around six months ago I stumbled over dovecot, which from my POV have
the following crucial features:
1. folders under the users' home directories, either as mbox or as
maildir, which allows me to do list filtering with procmail, and no
central databases that can become corrupt
2. understandable configuration (the only change I'd had to do in the
debian dovecot, is to allow for cram-md5 authentication)
I decided om maildir as the folder format. I like the simplicity of
mbox folders, but I have some archive folders with around 20k of
articles each, and maildir would scale a bit better for them. Also mail
delivery without locking is a very nice feature.
Here's how I proceeded:
- I set up dovecot on my daughter's Ubuntu Hardy machine
- I ran imapsync on this machine to extract everything I had on the
cyrus server to Maildir folders in the users' home directories on the
Ubuntu box
- I shut down fetchmail on my gateway box (since ISP port filtering and
blacklisting of dynamic addresses stops direct SMTP delivery I have
to use ISP gateways and mail drops)
- I changed the exim conf on my gateway from using cyrdeliver to
delivering to a maildir folder in the users' home directory
- I restored my old .procmailrc file from subversion (my home directory
is checked into subversion, this was originally a CVS repo that went
subversion a couple of years ago), merged in the last version of the
.procmailrc that used cyrdeliver (I gave up on that because the
.procmailrc file had to be owned by user cyrus, which was very
impractical), and changed the filtering rules to deliver to maildir
folders
- I tested some delivery
- I apt-get install'd dovecot from the etch back ports pointed to from
the dovecot install page
http://wiki.dovecot.org/PrebuiltBinaries#head-477d52d96fcf34ad3033b13e5e5a266ed6421872
This uninstalled cyrus22-imapd, but not the rest of cyrus 2.2,
which blocked dovecot from starting after the install
- I stopped cyrus22 and uninstalled all of the cyrus22 packages
- I rsync'd the maildir folders from the Ubuntu box to the old mail
server
- I started dovecot
- I use Gnus as my MUA. I had removed all nnimap groups related to the
home server in Gnus, and resubscribed them. All folders came up in
the state I had left them. Gnus stores article state on the server as
custom marks, and imapsync had preserved the custom flags. I
unsubscribed the groups to avoid article caching confusion, because
imapsync changes the UIDs. However, all folders except INBOX had
changed their names, so that didn't matter much
- I started fetchmail and sent som test emails, and observed that they
ended up in the right Maildir folders, and that dovecot picked them
up as expected
And today I accessed the server from work. So it looks like I'm back in
business. This time with a server I understand a lot better.
Thanx for writing it, Timo!
- Steinar