Mail-conversion tips and tricks (Outlook/OE/MBOX/Eudora/Lotus Notes)


Short introduction

Mail conversion: what an incredible hassle! Have you ever stuck in wanting to change your favourite mail application and discovered that the format it uses is just… plain horrible and it seems almost impossible to convert your 10GB mail archive?

Well, I did it many times. Nowadays I tend to use only mail programs which use only the old-but-dear UNIX mailbox format or the Maildir format.
This is definitely the most used format all over the world for storing mail, and despite its age and some problems it has, it is very good since it is read by many mail apps.

So, how can you convert your existing mail archive to another one? Let’s find out!

But first of all, a small note:
I SHOULD NOT BE HELD RESPONSIBLE OF ANY DAMAGE THAT MAY HAPPEN TO YOU, YOUR COMPUTER, YOUR DATA OR ANYTHING ELSE FOR THE INSTRUCTIONS PROVIDED BELOW. USE THEM AT YOUR OWN RISK.

List of the mail apps techinques described here

In this page I’m going to describe some techniques I’ve successfully managed to work with these apps:

You may find however that these techniques also work for other apps. If you do, let me known!

Outlook/Outlook Express to UNIX mailbox

This is definitely the most simple way of mail format interchange among those described here. You have to install an IMAP server on your machine (e.g., Cyrus IMAP server) and add a new IMAP account to Outlook Express that points to an ad-hoc account on your newly installed local IMAP server.

Then, create the folders you need in your IMAP server and move all your email to the new account by dragging and dropping it directly in Outlook. Despite it may take a lot of time if you have a lot of mail, you now have all the email on your local IMAP server and you can do whatever you want from there: download it in your new email client, or use the UNIX mailbox files that you can gather from the server and change them.
Instructions and uses are trivial, and I’m not going to list them here.

Please note that attachments are usually preserved in the right way!

Eudora to UNIX mailbox

This step is a bit more difficult. You have to behave exactly in the same way as in Outlook, but when you have finished moving your email to the server you have to modify the UNIX mailbox files the IMAP server has created, since Eudora (at least the version I used, 6.0 for Windows) tends to insert some proprietary-tags (or at least non-standard conformant tags) in the exported files.

To clean these tags, I used this bash and Perl
hand-crafted script:


#!/bin/bash

perl -0777 -pe 's/n<x-html>/Content-Type: text/htmlnn<x-html>/g' "$1" > "$1.new"
perl -0777 -pe 's/Content-type:.{0,1}text/plainnContent-type: text/htmln/Content-type: text/htmln/gi' "$1.new" > "$1.newnew"
perl -0777 -pe 's/nn<html>n/nContent-Type: text/htmlnn<html>/gi' "$1.newnew" > "$1.newnewnew"
rm "$1.new" && rm "$1.newnew" && mv "$1.newnewnew" "$1.new"

which should be run on every mailbox file you export from the IMAP server.
(if the script above breaks lines, be sure to copy them properly!)

Please note that the given script requires a parameter, which is the name of the mailbox to be cleaned.

This way was enough for me to have Eudora export everything properly into a nice UNIX mailbox file.

Lotus Notes to UNIX mailbox

Lotus Notes is a widely-used application used in large corporations. Calling it a mail app would be very reductive: in some way, it is to a mail application as Emacs is to file editor.

As many large corporations, also mine uses Lotus Notes. So I started looking for a way of converting its mail format to a UNIX mailbox file so that I can import it in my favourite email client (which, by the way, happens to be
Mail.app)

I had to hack a bit with Lotus Domino in order to be able to do email conversion: in fact, user and database creation, along with control access lists are not immediate to find in Domino.

If you have IMAP access to the server you’re lucky, and you should go no further: download mail with your favourite client and you have finished.

Otherwise, the first thing you have to do is to create a local copy of your NSF database (Database -> New Copy), which must have no permission set (or all permissions allowed by everybody – this can be changed through the Database -> Access Control menu)

After that, go to the IBM website and find a trial version of Lotus Domino, both client and server.
Download them (you will need a free registration for doing this) and install them on your computer (a PC with Windows, in my case).
Startup the server in IMAP mode (which is the default, so you shouldn’t do anything) and create an account to use the .nsf file you created a few steps ago.

Finally, set up your favourite mail application to connect to your local Notes server using the new account ID.
After that, simply download all the Lotus Notes email to your app!

Please note that if you use POP3 access, you can’t synchronize your sent email, but only your received email.

Final notes

I hope that the information provided here was enough for your needs. If you need further help, feel free to ask.

This page was the result of past experiences I had with these email formats, and I found that the Internet, despite full of ideas on the mail-conversion topic, was not giving the right answers I was looking for (not, at least, in a single place).
In any case, I suggest you to make a search on Google to find the answers you need and also to visit this other site.

If you want further information about my projects, please visit my software section.

  1. No comments yet.
(will not be published)


css.php