Sofware in Review
Tech news
at TheJemReport.com
Software reviews
at SoftwareinReview.com
Hardware reviews
at HardwareinReview.com
Discuss technology
at TJRForum.com
Sofware in Review → Tutorials → Migration guides →

Moving email from Windows to Linux

By Jem Matzan

Moving from Windows to GNU/Linux and need to take your saved email with you? Here's how you can do it.

Migration software

The quickest and easiest way to get all of your email, contacts, appointments, and nearly all other manner of personal data from Windows to GNU/Linux is to use Versora Progression Desktop (I also reviewed it a few weeks ago). It's easy to use and works as advertised. It is proprietary software, though, and will cost you around US $30.

Conversion utilities

There is at least one script on the Internet that will directly convert an Outlook .PST file into a data format that GNU/Linux email clients can use: libPST. It's difficult to use and doesn't always produce the most desirable results. It also appears that the project is dead -- as of this writing, no development has been done on libPST since 2002.

I strongly recommend against this solution -- you could lose some of your email. If you're going to try it anyway, to be safe, make sure you make an extra copy of your Outlook data file before you attempt to use libPST.

Mozilla Thunderbird

It may seem convoluted to do it this way, but you can use the Mozilla Thunderbird email client to import Outlook or Outlook Express email. Since Thunderbird stores email in the universally readable MBOX format, you'll have no trouble moving its data files over to GNU/Linux. And if you like Thunderbird, you can stick with it when you move to your new operating system.

First you need to download Thunderbird; you can do so for free at this address. When it's finished downloading, run the installer from the location that you downloaded it to. The installation is easy and only takes a few minutes.

After Thunderbird is installed, run it -- either from the desktop icon or through the Start menu. The first time Thunderbird starts, it will ask if you want to import settings and data from Outlook or Outlook Express, depending on which one you use. Click the Next button to start the conversion process. When it's done, click Finish to start Thunderbird. The program will ask you if you'd like to set it as the default email client. It doesn't really matter whether you choose "yes" or "no" here unless you're going to keep using this instance of Windows. If you choose "yes," Thunderbird will be your default email client. If you do this and then change your mind later, all you have to do is start Outlook or Outlook Express; just like Thunderbird, they will ask you if you want to set them to the default.

Thunderbird will import your email, email account settings, and address book entries. It will not import your calendar appointments from Microsoft Outlook, so be sure to write them down or transfer them to your PDA so that you can re-enter them in your new appointment program later.

To save your address book, start by clicking on the Address Book icon in the Thunderbird toolbar. Another window with your contacts in it should pop up. In that new window, go to the Tools menu and select Export. Type in "addresses" (without the quotation marks) into the File Name field, then save the file to a place you can find (My Documents or Desktop are good places), then click on Save. This will create a file called addresses.ldif.

At this point you will need a writable CD to put your data files on. If you have a Zip or Jaz drive, that will also be sufficient. Open up your CD writing utility (or use Windows XP's built-in CD recording abilities in the Windows Explorer) and add the addresses.ldif file to your backup project. There are still two more files you need, so don't finalize the backup yet. Just minimize the CD recording utility for now.

To save your email, you need to find the data files that contain your email messages in Thunderbird. There is a set of files in the following directory in Windows XP and Windows 2000:

C:\Documents and Settings\username\Application  Data\Thunderbird\Profiles\randomletters\

In Windows 98 and Windows ME, the directory is different:

C:\Windows\Application Data\Mozilla Thunderbird\Profiles\randomletters\

In the above examples, substitute your Windows username for the "username" in the path (if you did not set up user accounts in Windows, choose the Administrator folder here), and the "randomletters" are going to be a random series of letters that uniquely identifies each installation of Thunderbird. The Application Data folder may be hidden. To unhide it, go to the Tools menu and click on Folder Options, then click on the View tab, then on the Show Hidden Files And Folders option. Click on OK to finish.

The files you need to backup are called Inbox and Sent, and they're in the Mail directory. So double-click on Mail, then add the Inbox file and the Sent files to your backup. If you had any draft email messages, copy over the Drafts file as well. That's all of the data you have to save, so you can write your CD and exit Thunderbird.

Importing into Evolution, KMail, or Thunderbird

One you have your GNU/Linux system installed, updated, and configured to your preference, it's time to restore your email and address book data. First you will have to decide which email programs you have, and which one you want to use. Most GNU/Linux distributions come with more than one email client -- each has its own pros and cons, but basically it all boils down to a matter of personal preference.

Novell Evolution is most like Microsoft Outlook. It has a similar interface, and does all of the same things that Outlook does -- email, contacts, tasks, and calendar. KMail is now integrated with Kontact, and together they provide Evolution-like capabilities, though the interface is not quite as similar to Outlook. Mozilla Thunderbird you've already seen -- it's the same in Windows as it is in GNU/Linux.

Insert your backup CD, mount it if necessary (most desktop distributions mount CDs automatically; if a CD icon appears on your desktop a few moments after you've inserted the CD, you're all set), and open up the email program of your preference. All of the email applications have one thing in common: they will begin by asking you for your email account information. If you don't have this information, you can usually just cancel the introduction and go directly to the program. Doing that won't help you much, though, as you won't be able to send or receive email until the account is set up. If you don't know your account settings, your Internet service provider can tell you what they are.

Skip down to the section below that corresponds with the email client you want to use.

Evolution

Open the File menu and click on Import. This brings up the Evolution Import Assistant. Click Forward to get started, then select Open A Single File and click the Forward button. Use the Browse button to navigate to your CD drive, then select the addresses.ldif file and click the Open button. This brings you back to the Import Assistant. Click the Forward button to import your address book data into Evolution. Repeat this process for your Inbox and Sent files, but instead of the LDIF file type, you're going to have to select the MBOX type from the drop-down menu in the Import Assistant's file selection dialogue. Import the Inbox into your Inbox, and Sent into your Sent folder.

KMail

Open the File menu and click on Import Messages. This will bring up the Kmail Import Tool. From the drop-down box, select Import Mbox Files and then click the Next button. A file dialogue will follow; navigate to your CD drive, click on Inbox, and then click the Open button. Import these messages into your Inbox. Repeat this process with the Sent mbox file.

To import your contact list, click on the Tools menu and select Address Book. This starts the KAddressBook program, which is integrated with KMail. From within KAddressBook, click on the File menu and select Import. A submenu will appear to the right; in it, select Import LDIF Address Book. A file menu follows; navigate to your CD drive, click on the addresses.ldif file, then click the Open button.

Thunderbird

In Thunderbird's Tools menu, select Import. This will bring up the Import Wizard. Select the Address Books option, then click Next, then Next again to select the LDIF format. In the ensuing file dialogue, navigate to your CD drive and select the addresses.ldif file, then click Open to import your address book.

For email, the import process is a little more difficult. Start by clicking on your Home icon, either on your desktop or in the quicklaunch area near the top (on GNOME) or bottom (on KDE) of your screen. If you're using GNOME, the Nautilus file manager will come up. Go to the View menu and select Show Hidden Files. Now find the folder called .thunderbird and open it. Inside of that folder is another folder with a bunch of random characters; open it. From there, open the Mail folder. There you should see yet another folder, but this one will have your email account as its title. Open that, then open the CD icon on your desktop. You should now have two open windows -- the one you just navigated to, and your backup CD. Drag and drop your Inbox and Sent files from the CD to the first window. Once they are copied, close the CD window, then select the Inbox and Sent files that you just copied. Right-click them, select Properties from the popup dialogue, and change their file permissions so that they may be written to (files that were stored on a CD will, by default, be unwritable when you copy them to your hard drive).

If you're using KDE, you'll get the Konqueror file manager instead of Nautilus. In the address bar at the top of the Konqueror window, put a slash (that's the / key) in front of the address, then type in .thunderbird -- you will notice that when you type the slash, a drop-down box appears to show you possible entries that begin with the letters you're typing. Feel free to click on the .thunderbird directory (or press the down arrow, then the Enter key) when you see it. Now you're in the .thunderbird directory; open the folder with the random letters, then the Mail folder, then the folder with your email account name, and follow the directions above to copy the Inbox and Sent files over to your hard drive -- and don't forget to make them writable by right-clicking on them and then selecting Properties.