Migrating mail from KMail to Evolution

At work I am busy migrating some Linux desktop users from an old Slackware 12.0 system with KDE 3.5 to Debian Squeeze with GNOME 2.30. So I had to migrate the e-mails from KMail to Evolution, a task which was not that trivial as you would hope at first.

On these systems, the mails were saved in ~/Mail. This directory did not contain a standard maildir structure or mbox files, but some weird mix of those two. I do not know whether this is typical for KMail or whether this was a peculiarity on these systems because the e-mails have been migrated from even other e-mail clients and versions in the past already.

The first step was to make a standard maildir out of this structure. I created ~/Maildir and searched for all directories called “cur” in ~/Mail. All parents of these directories are standard maildir folders, so I copied these to ~/Maildir. One of them was called inbox. In maildir, the inbox is just the parent directory and not some folder called inbox. So I moved the cur new and tmp subdirectories of ~/Maildir/inbox to ~/Maildir itself. Then I renamed all other subfolders in ~/Maildir so that they contained a dot before the actual folder name, as this is how subfolders are named in maildir.

Now I was still left with a few mbox mail folders. These are single files which contain a whole mailbox. In order to convert them, I used the mb2md script. I ran mb2md -s ~/Mail -R ~/Maildir/ to convert all remaining mbox folders to the maildir structure.

Then I had a nice maildir structure, but Evolution cannot directly import Maildir folders. However it should be possible to create a local Maildir account in Evolution, pointing to the ~/Maildir directory and then copying over all folders. I did not try this. Instead, I installed the Dovecot IMAP server and edited /etc/dovecot.conf. I set these options:

protocols = imap
mail_location = maildir:~/Maildir

and restarted dovecot. Then I configured an IMAP+ account on localhost in Evolution, and dragged and dropped all IMAP folders to the local folders.

KMail’s address book is stored in ~/.kde/share/apps/kabc. Double clicking on the most recent vcf file there, should be enough to open and import it in Evolution.

Debian on desktop systems

What I expected to happen some time ago, is finally becoming reality: Debian is now my favourite distribution for desktop systems.

First I installed Debian on my new Samsung N210 netbook and I was very pleased with the result. Shortly after that, my father experienced a bug while trying to print in Firefox on Mandriva 2010.1. It would fail to print and there were errors related to ps2ps (if I remember correctly) in the Cups log, hinting at some bug in Ghostscript. Actually it was not the first time this bug hit us, I had seen the same problem some weeks ago.

As analysing and having this bug fixed would likely take a lot of time and I needed a rather quick solution, I though it was the right time to reinstall this system with Debian Squeeze (testing). Debian has many additional bug fixes in its GhostScript package so there was a fair chance that printing would be working better. So I did the same as with my netbook last week: I set up PXE booting to start the Debian installer (easier than digging up a CD-R, downloading an ISO and burning it), and then I installed Debian on the disk, leaving the old /home logical volume intact.

Continue reading “Debian on desktop systems”