The title may sounds pretentious but extracting mails out of Lotus Notes is soooo hard and complicated, that achieving such a task feels like winning an epic battle against the forces of evil.

Anyway. The goal of this post is to help you migrate all your Lotus Notes mails to a more convenient and standard format like maildir or mailbox.

There are several ways of extracting all your mail trapped in Lotus Notes’ proprietary databases.

Method #1: Using Integrated IMAP Service

This is probably the simplest method. It consists in using the Lotus Notes desktop client (were your emails currently resides) as an IMAP client.

Essentially, what you have to do is just to create a secondary account linked to an IMAP server, like Gmail, etc. This works well and is explained in details in this tutorial.

But sometimes your Notes client is behind firewalls and proxys. So you can’t reach the Internet.

And some other times, Lotus Notes clients are crippled and don’t let you create an IMAP connexion. Unfortunately this happened to me:

So I had to found another approach.

Method #2: Using Nlconverter

This method is explored in details in my previous article.

But again, it seems that the Lotus Notes on my machine was crippled and/or corrupted. The nlconverter GUI gave me this error:

And the command line gave me this:

Traceback (most recent call last):
  File "", line 21, in <module>
    db = NlconverterLib.getNotesDb(notesNsfPath, notesPasswd)
  File "C:\winnlc-alpha-1\", line 43, in getNotesDb
    session = win32com.client.Dispatch(r'Lotus.NotesSession')
  File "C:\Python26\lib\site-packages\win32com\client\", line 95, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python26\lib\site-packages\win32com\client\", line 104, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python26\lib\site-packages\win32com\client\", line 84, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221231, 'ClassFactory ne peut pas fournir la classe demand\xe9e', None, None)

After these two failed attempts, I was quite depressed and not far from surrender to the evil power of proprietary software. Then I managed to setup a new (but complicated) strategy.

Method #3: Using Lotus Notes Client for Mac OS X

This is the only method that worked for me, and basically, is the same as the first one, but on Mac OS X. Additionally, it involves a local mail server. This procedure was tested several times on Leopard (OSX 10.5).

  1. First things first, download the trial version of Lotus Notes client for Mac OS X (unfortunately you have to register) and install it. I used Lotus Notes 7.0.3 for Mac OS X Leopard (10.5):

  1. You’ll be welcomed by a wizard:

  1. On the next screen, enter a dummy name and uncheck the “I want to connect to a Domino server” box:

  1. Then proceed to the next step in which you’ll uncheck “Setup instant messaging“:

  1. In the last screen, uncheck all boxes. We don’t want to setup any other service yet:

  1. Initial setup is now complete:

You can now launch Lotus Notes:

  1. On first run, there will be the following screen, where you should click on the “No thanks, just give me the defaults“:

  1. You’ll end up on what will be your default Lotus Notes main page from now on:

  1. The next step is to go back to the machine (Windows for me) from which you’re running the Notes client containing all the mails you plan to migrate. From there, export your mail database:

All details of this operation can be found in this dedicated article.

  1. Then go back to your Mac OS X machine and import your freshly exported .nsf database. This is as simple as opening the file via the File > Database > Open... menu and dialog:

  1. When Notes attempts to open the file, you’ll be prompted by several dialogs regarding the security attached to the database. If you get the “Create Cross Certificate” screen, then just answer “Yes” as below:

And every time you get an “Execution Security Alert” message, always check the “Start trusting the signer to execute this action” option before clicking “OK“:

  1. The client will then rebuild the index before giving you a plain view of your inbox:

  1. Next step is to setup a local IMAP server:

As you can see I used Dovecot, and all is explained here.

  1. Now it’s time to create a new account in Lotus Notes to access this local IMAP server. Click on the Address Book in your toolbar and add a new Account:

  1. Here is where you configure Notes to let it be aware of our local server existence. Only the first tab must be changed to your local parameters. You can left the last two tabs untouched:

  1. Open within Notes your local IMAP mailbox. It is found in the workspace, which you can access via the Databases icon on your toolbar:

  1. You’ll be welcomed by a useless help screen:

Just close it to get your local IMAP mail view:

  1. While trying to opening the local IMAP mailbox, you may encounter this TCPIP port error:

In this case, please have a look at my other article explaining how to open TCPIP port in Lotus Notes.

  1. For this step, just copy or cut, then paste, mails from your local .nsf database to your local IMAP account:

  1. While playing with copy’n’paste, you may encounter this error:

A workaround can be found in this article.

  1. Finally, if like me you’ve played a lot with mails during the transfer step above, you may ends up with loads of duplicate mails. In this case have a look at the deduplication script I wrote. It will help you clean-up your Maildir folder.

  2. That’s it ! You now have a standard Maildir of your Lotus Notes mails, located in your user home directory (~/Maildir):

My ultimate action was to convert the Dovecot maildir to Kmail maildir, as I wanted to use Kmail to finally upload everything in Gmail. But you can use anything that suit your needs, like thunderbird or any mail conversion tools.

Method #4: Lotus Notes Client V8.5 on Snow Leopard

The same procedure as in method #3 can be performed with the trial version of the Lotus Notes client v8.5, running on Mac OS X Snow Leopard (10.6).

Here are the equivalent screenshots:

Method #5: Lotus Notes Client on Windows XP

I just tried the first method again (IMAP connection with Note’s fat client). But this time I installed Lotus Notes 8.5.2 trial version on a fresh Windows XP running within a QEMU instance.

As you can see, it works:

With simple copy’n’paste, I was able to migrate several batch of mails. Until the target notes-import folder on my Gmail account reached 2000+ mails, at which point my Notes client freezed hard. So I’m stuck with only part of my mails migrated. Again, this is not the solution I’m looking for, as it can’t handle large quantity of mails. :(


  • Lotus Notes sucks. Everybody knows that, but I feel liberated saying that ! ;)

  • The smartest thing to do is to avoid Notes like the plague in the first place. Sadly when working for the man, it’s not always possible… :(

  • The only method I found to work for me (the third solution in this article) is far from perfect from my point of view. What I dream about is a 100% automated solution, like a command line utility we can name nsf2maildir. And as I don’t plan to own Apple hardware and software in a near future, such a command should be 100% free software and running on Linux. I really think there is a “market” for a free software component able to read and understand .nsf files. Any motivated volunteer ? ;)

Related content