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 proxies. 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:

French Lotus Notes new-account window filled in for imap.test.com over IMAP with SSL, its status bar ending on the error: Mail (IMAP) template does not exist

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:

Lotus Notes Converter on Windows, its log repeating Could not connect to Notes and Could not find and register the dll

And the command line gave me this:

Traceback (most recent call last):
  File "notes2mbox.py", line 21, in <module>
    db = NlconverterLib.getNotesDb(notesNsfPath, notesPasswd)
  File "C:\winnlc-alpha-1\NlconverterLib.py", line 43, in getNotesDb
    session = win32com.client.Dispatch(r'Lotus.NotesSession')
  File "C:\Python26\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 104, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", 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 Mac OS X Leopard.

  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:

    Install Notes 7 for Mac open on its Read Me step, in front of a Finder window showing the installer package of the Lotus Notes 7.03 disk image

  2. You’ll be welcomed by a wizard  :

    Welcome step of the Lotus Notes 7 client configuration wizard, listing the Domino, mail, newsgroup, directory and instant messaging servers it can set up

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

    Wizard user information step with the name set to Kevin, the Domino server box empty and the option to connect to a Domino server unchecked

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

    Wizard instant messaging step with the Setup instant messaging box unchecked

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

    Wizard additional services step with all five boxes unchecked, including internet mail servers and replication

  6. Initial setup is now complete:

    Small dialog announcing that Notes setup is complete

    You can now launch Lotus Notes:

    Finder on the Applications folder with Notes.app selected, its preview naming the application Lotus Notes 7.0

    Lotus Notes 7 splash screen, a yellow photo mosaic above the line Release 7.0.3 September 26, 2007

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

    Lotus Notes 7 setup page on first run, offering a new Welcome Page, a tour of what is new, or No thanks, just give me the defaults

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

    Default Welcome page of Lotus Notes 7 with its Mail, Calendar, Contacts, To Do List and Personal Journal buttons

  9. 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  :

    French Notes dialog copying the mail database to a local file named kevin-mails-2010-07.nsf, its source name scribbled over

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

  10. 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:

    File menu of Lotus Notes open on Database, with its Open item highlighted

    Open Database dialog on the Desktop with Kevin's notes big backup selected, from the file kevin-notes-big-backup.nsf

  11. 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:

    Create Cross Certificate dialog, organization and public key blacked out, warning that documents from this organization cannot be verified

    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  ”:

    Execution Security Alert about a GetProfileField action, the signer blacked out and the option to start trusting the signer selected

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

    Imported database open on its French inbox while Notes updates the view, the quota bar at 22% of 550 MB

    French inbox of the imported database listing 8735 messages, senders and subjects blurred, the quota bar at 22% of 550 MB

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

    Terminal following the mail log, where Dovecot 1.2.10 records the IMAP logins of the user kevin from 127.0.0.1

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

  14. 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 :

    Tooltip naming the Address Book icon in the sidebar of Notes

    Contacts view of the Notes address book with the New menu unrolled and Account highlighted

  15. 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:

    Account form named Local IMAP, pointing at localhost with the login kevin, the password blacked out, the protocol IMAP Online and SSL disabled

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

    Databases panel opened from its sidebar icon, with Workspace highlighted at the top of the list

    Notes workspace showing four database tiles: the address book, the bookmarks, the imported backup and Local IMAP

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

    About Mail (IMAP) help page that Notes opens on the first visit to the Local IMAP database

    Just close it to get your local IMAP mail view:

    Local IMAP inbox open in Notes, with its Inbox, Drafts, Sent and Trash folders and no message yet

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

    Error dialog: Error logging into server localhost: You must enable the Notes TCPIP port

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

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

    Edit menu open on Copy in the French inbox of the backup, the status bar reporting 8 735 documents selected, senders and subjects blurred

    Progress dialog reading 15 document(s) remaining to copy to clipboard, over the French inbox of the backup, senders and subjects blurred

    Edit menu open on Paste in the still empty Local IMAP inbox

    Progress dialog reading 27 document(s) remaining to paste from clipboard, over the Local IMAP inbox

    Local IMAP inbox filled with the migrated messages, senders and subjects blurred

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

    Error dialog: Cannot convert Notes Rich Text message to MIME message

    A workaround can be found in this article  .

  21. 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.

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

    Terminal listing the cur folder of ~/Maildir, full of message files named after the kevins-macbook-pro.local host

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 Mac OS X 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.

Here are the equivalent screenshots:

Notes 8.5 for Mac installer open on its Read Me step, in front of a Finder window showing the trial disk image

Installer component list with Composite Application Editor and Sametime both left unchecked, so the space required stays at 0 KB

Installer summary with a green tick and the message: the installation was successful

Welcome step of the Lotus Notes 8.5 client configuration wizard, listing the Domino, mail, newsgroup and directory servers it can set up

Wizard user information step with the name set to kevin, the Domino server box empty and the option to connect to a Domino server unchecked

Wizard additional services step with all five boxes unchecked, including internet mail servers and replication

Small dialog announcing that Notes setup is complete

Lotus Notes 8.5 splash screen, an IBM yellow swoosh above the licensing small print

Startup dialog with a barber-pole progress bar reading: Lotus Notes is starting, please wait

Prompt asking whether to make Lotus Notes the default email program, with the option to skip the check in future ticked

Notes 8.5 Getting Started page explaining the Open button, the toolbar search and the sidebar

File menu open on Open, with the Lotus Notes Application entry highlighted

File chooser on the Desktop with kevin-notes-big-backup.nsf selected, the preview reporting a 167 MB Notes database file

Create Cross Certificate dialog, organisation and public key redacted, warning that documents from this organisation cannot be verified

Execution Security Alert about a GetProfileField action, with the option to start trusting the signer selected

Imported .nsf database open on a French inbox of 8715 messages, senders and subjects blurred, the quota bar at 28% of 550 MB

Lotus Notes application menu with Preferences highlighted

Accounts pane of the preferences with the New Account menu unrolled and IMAP Online highlighted among the protocol choices

New Account dialog naming the account Local IMAP, of type IMAP Online, pointing at localhost and logging in as kevin

Open button menu drilling through Applications and the workspace tab to the Local IMAP entry

Local IMAP account open in Notes on a completely empty inbox

Edit menu open on Copy in the .nsf inbox, the status bar reporting 22 documents selected

Edit menu open on Paste in the still-empty Local IMAP inbox

Local IMAP inbox filled with the migrated messages, senders and subjects blurred

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:

Windows XP running inside QEMU, French Notes client pasting into a notes-import IMAP folder with 184 documents left to go at 74%

With simple copy’n’paste, I was able to migrate several batch of mails. Until the target notes-import IMAP folder 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. :(

Conclusion

  • 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? ;)

2 archived comments

  1. Haha "Lotus Notes Sucks"... wish I had a penny for every time that was typed.

  2. Thank You very much for this tutorial! Crystal clear. I tested method #4 (I am using a mac). I left quickly my corporate job with just a copy of my Lotus Notes folder. Not a proper export. Was not the admin. I got the error that 'the database is locally protected (crypted). You don't have access to it'. It was worth testing. I welcome every further suggestion or ressources. Again, thank you very much. It was very helpful and saved me lots of energy.