Courex

Welcome

 Top Next

Courex

Courier Email Export

Screenshots

Overview

Background

Installation

Starting the Export

Exporting Direct to Thunderbird

Exporting to Unix/Mac Thunderbird

Exporting to eml/mbox Files

Cancelling the Export

The Export Log File

Courex Error Messages

Epilogue

This software is donateware.

You may freely download it and use it fully - it is not restricted in any way.

If, after using it, you find that my time spent creating it has saved you a lot of time and/or money, you are invited to "buy me a drink".

Donating is secure and easy using PayPal. Just click on the button below and make a transfer from your PayPal account or use your credit card.

Thanks,

Laurence

Download executable and documentation (135KB ZIP archive, version 1.2, October 27th, 2007)

"Courier" is a registered trademark of Rose City Software.

Courex is independently-produced and is not a part of Courier.


Screenshots

 Top Previous Next

The setup dialog

The progress dialog


Overview

Courex exports the contents of a Courier email client mailbox database (BOX file) to standard format files for email client migration or for archiving. Email messages are exported complete with integrated attachments. The Courier folder structure is preserved.

Courex exports email messages to standard eml and/or mbox files, directly into Thunderbird (one-step export-import), or as a Thunderbird format folder structure for transfer into non-Windows Thunderbird systems.

Although Courex has special features to support migration to Thunderbird, it's usefulness is certainly not limited to that client. Almost all email client applications can import from the eml/mbox format which, together with the fact that attachments stay attached to the message, makes it a very useful format for long-term archiving.

Courex also exports the Courier address book to a plain text comma-delimited Address.csv file. Courier already has this facility built-in, but Courex exports the fields optimised for import into Thunderbird. It is your choice whether to use the address book as exported by Courier or by Courex.

Courex also writes information it finds about Courier accounts to a plain text Accounts.txt file. This file can be used as a reminder of the correct server names, user names and passwords to use when entering account information into other client applications. This file cannot be used to import account information directly. Warning: The Accounts.txt file contains your passwords in plain text form.

You can also select whether to output files with DOS/Windows line terminators (CR/LF) or with Unix line terminators (LF only). This affects all files, including the Account.txt and Address.csv files. Use this option if you are migrating to a Unix/Linux system (or you can use it when exporting to Thunderbird for slightly smaller mailbox files - Thunderbird doesn't care what terminators are used).

Courex generally requires only the BOX file (but see next paragraph). No other files are required and the Courier application is not required to be installed on the system on which you are performing the export. If Courier is installed, it should not be running while using Courex.

From version 1.1, Courex will automatically re-integrate separated attachments detatched from the original message by Courier (that is, it will read the external file, if found, base64 or quoted-printable encode it, as necessary, then re-attach the encoded file to the message).

Version 1.0 could, under certain rare circumstances, miss some folders in some Courier mailboxes. Version 1.1 corrects that. Version 1.1 also improves the detection and correction of concatenated messages and fixes some small bugs elsewhere.

For some other differences between versions 1.0 and 1.1 see The Export.Log File.

From version 1.2, Courex can handle mailbox files up to 4GB in size. Previous versions were restricted to 2GB. A further improvement to the detection of concatinated messages has also been made. A positive "lock-out" of early Windows versions has been implemented. It will no longer try (and fail) to run on versions before 2000.


Background

I am still looking for my perfect email client. In my quest, I have tried a lot of applications, some for a few hours, some for a few days, some for a few months, even some for more than a year. Two I even paid for. In this process, I have always managed to somehow get my messages out of one client and into the next. Until I tried Courier for a few months.

Courier comes pretty close to being my perfect client. It has the drawback that development on it has stopped for several years, but the overriding thing which decided me to stop using it was that it is so very slow. It seems to build it's indexes afresh on each entry and, if you're unlucky enough to have your computer power down or crash with Courier open, well, you can look forward to the computer being locked up for several minutes the next time you open it while Courier verifies and rebuilds it's database.

One thing that a lot of people like about Courier but which makes me decidedly uneasy is that it provides the ability to edit messages already sent or received. I want my emails to stand as a record of communications "carved in stone" and I don't want the ability, or the temptation, to alter them.

A nice aspect of Courier is that it uses a single integrated database file for everything; all email messages in all folders, address book and all settings. This, together with the fact that it is not buried in some obscure location under "Documents and Settings", makes backup very easy. But the backup doesn't do you any good unless you have a copy of Courier to access it. And, as I said above, this approach (or the way it is implemented) does seem to make everything very slow.

The Courier database file is encrypted and in a proprietary binary format. Until now there has been no facility to export complete email messages from the Courier database. Courier does have the facility to create "archives". These are individual email messages in plain text form, accompanied by any attachments in binary form in a subfolder. Previous attempts at producing an export utility for Courier have focused on these archives, and have not yielded completely satisfactory results.

Partly because I didn't know even of these semi-successful utilities when I started, I decided to write my own export utility. It was supposed to be a quick and simple private project, but it grew - mainly because I made the mistake of talking about it in public! Through the co-operation of some good folks at WindowsBBS and others, it has now been tested with a variety of different mailboxes, so I'm fairly confident that it will work with yours. It also acquired a name: Courex!

Courex skips the middle-man and exports directly from the Courier database file. Courex exports to eml and mbox files. The eml and mbox formats are relatively standard and are recognized by most email client applications for the import of email data complete with attachments.

During initial discussion and testing of Courex, it became apparent that almost everyone who was contemplating a move away from Courier was focussing on Mozilla Thunderbird. Thunderbird uses the mbox format as it's native mailbox format, so it was relatively easy to provide some Thunderbird-specific extensions to Courex.


Installation

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam velit risus, placerat et, rutrum nec, condimentum at, leo. Aliquam in augue a magna semper pellentesque. Suspendisse augue. Nullam est nibh, molestie eget, tempor ut, consectetuer ac, pede. Vestibulum sodales hendrerit augue. Suspendisse id mi. Aenean leo diam, sollicitudin adipiscing, posuere quis, venenatis sed, metus. Integer et nunc. Sed viverra dolor quis justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis elementum. Nullam a arcu. Vivamus sagittis imperdiet odio. Nam nonummy. Phasellus ullamcorper velit vehicula lorem. Aliquam eu ligula. Maecenas rhoncus. In elementum eros at elit. Quisque leo dolor, rutrum sit amet, fringilla in, tincidunt et, nisi.

Donec ut eros faucibus lorem lobortis sodales. Nam vitae lectus id lectus tincidunt ornare. Aliquam sodales suscipit velit. Nullam leo erat, iaculis vehicula, dignissim vel, rhoncus id, velit. Nulla facilisi. Fusce tortor lorem, mollis sed, scelerisque eget, faucibus sed, dui. Quisque eu nisi. Etiam sed erat id lorem placerat feugiat. Pellentesque vitae orci at odio porta pretium. Cras quis tellus eu pede auctor iaculis. Donec suscipit venenatis mi.

Aliquam erat volutpat. Sed congue feugiat tellus. Praesent ac nunc non nisi eleifend cursus. Sed nisi massa, mattis eu, elementum ac, luctus a, lacus. Nunc luctus malesuada ipsum. Morbi aliquam, massa eget gravida fermentum, eros nisi volutpat neque, nec placerat nisi nunc non mi. Quisque tincidunt quam nec nibh sagittis eleifend. Duis malesuada dignissim ante. Aliquam erat volutpat. Proin risus lectus, pharetra vel, mollis sit amet, suscipit ac, sapien. Fusce egestas. Curabitur ut tortor id massa egestas ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec fermentum. Curabitur ut ligula ac ante scelerisque consectetuer. Nullam at turpis quis nisl eleifend aliquam. Sed odio sapien, semper eget, rutrum a, tempor in, nibh.


Starting the Export

When you start Courex you will see the following setup dialog:

At the top is a text box to enter the input file specification, that is, the Courier 'box' file that you want to export from. If you have Courier installed, Courex does it's best to find and enter the input file specification for you (as shown above), but if it cannot, or if it is incorrect, you can enter it or change it by direct editing or by use of the "Browse..." button.

Below that is a similar space to enter the base destination folder for the export. Courex will use this as the "parent" folder for your Courier email folders, which will be created as sub-folders of this base folder. If you have Thunderbird installed on the system, your Thunderbird "Local Folders" will be initially selected as the base export folder (as shown above). You can change this if you wish by using the "Browse..." button, or by typing a new or existing folder name into the text box (note: select whether or not you want to export "To Thunderbird" first).

If you do not have Thunderbird installed, or if you uncheck the "To Thunderbird" option, the destination folder will default to your Courier 'box' file folder, if this was found. If no 'box' file was found automatically, the destination folder will default to 'C:\'. See Exporting to Unix/Mac Thunderbird and Exporting to eml/mbox files for more details.

Next are four option checkboxes; "Create eml files", "Create mbox files", "Unix line breaks" and "To Thunderbird". The initial state of these checkboxes depends on whether or not you have Thunderbird installed on your system.

If Thunderbird is detected, "To Thunderbird" will be checked, "Unix line breaks" will be unchecked, and "Create eml files" and "Create mbox files" will be disabled.

If Thunderbird is not detected, "To Thunderbird" will be unchecked, "Unix line breaks" will be unchecked, "Create eml files" will be unchecked, and "Create mbox files" will be checked.

The "Unix line breaks" option can be checked or unchecked at will. This affects all output files, including Address.csv and Accounts.txt. If checked, lines are terminated by a LF (line feed) code only (Unix standard), otherwise lines are terminated by a CR/LF (carriage return / line feed) pair (DOS/Windows standard).

You can check or uncheck "To Thunderbird" at will to switch between output to a Thunderbird folder structure or output to a "standard" folder structure, whether or not Thunderbird exists on your system. If "To Thunderbird" is checked, "Create eml files" and "Create mbox files will be disabled. If "To Thunderbird" is unchecked, "Create eml files" and "Create mbox files will be enabled.

If "To Thunderbird" was automatically checked by detection of Thunderbird on your system and you then uncheck it, the destination folder shown in the text box will also change because Courex assumes that you don't want to export folders in "standard" format (which Thunderbird won't recognize) to your Thunderbird folder.

If not disabled, both "Create eml files" and "Create mbox files" can be checked. This will give you the most flexibility by exporting to both eml and mbx files, gives you the opportunity to manually correct individual "suspect" email messages and detect duplicates (see The Export.Log File) but it takes longer (the eml files are created first then they are concatenated, folder by folder, into mbox files).

You can check the "Create eml files" option and uncheck the "Create mbox files" option if you want to produce only eml files to a standard folder structure. Uncheck "To Thunderbird" (if necessary), check "Create eml files", then uncheck "Create mbox files". Courex will not allow all output options to be unchecked.

When the "Create eml files" process starts for a particular folder, all existing eml files in that folder are deleted. When the "Create mbox files" process starts for a particular folder, any existing <foldername>.mbox file will be deleted (in the case of exporting to Thunderbird, mbox files do not have the ".mbox" extension, but the same principle applies).

When you click "Start" to start the selected process(es), a separate progress dialog will appear which shows a progress bar, estimated total and remaining times and counts of messages processed. This is updated message by message and so, when processing an extraordinarily large message, it may appear to stall. Also the timings may be wildly inaccurate at low progress percentages - it gives reasonable estimates only at 20% and above. Remaining time assumes that remaining emails are of average size.

If you check both "Create eml files" and "Create mbox files", the progress dialog will run from 0% to 100% twice - once for creation of the eml files and again for creation of the mbox files from the eml files.

Export speed depends on a number of factors, the most important of which is the speed and the hard disk performance of the computer you're running it on, but we're talking minutes not hours, for even a very large mailbox. If your computer is reasonably modern and your box file is say 1GB, expect about 10 minutes for export to mbox only (exporting to both eml and mbox will almost double the time).

Courex actually generates the Account.txt and Address.csv files first, before starting message export, but so rapidly that you probably will not see the messages.


Exporting Direct to Thunderbird

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam velit risus, placerat et, rutrum nec, condimentum at, leo. Aliquam in augue a magna semper pellentesque. Suspendisse augue. Nullam est nibh, molestie eget, tempor ut, consectetuer ac, pede. Vestibulum sodales hendrerit augue. Suspendisse id mi. Aenean leo diam, sollicitudin adipiscing, posuere quis, venenatis sed, metus. Integer et nunc. Sed viverra dolor quis justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis elementum. Nullam a arcu. Vivamus sagittis imperdiet odio. Nam nonummy. Phasellus ullamcorper velit vehicula lorem. Aliquam eu ligula. Maecenas rhoncus. In elementum eros at elit. Quisque leo dolor, rutrum sit amet, fringilla in, tincidunt et, nisi.

Donec ut eros faucibus lorem lobortis sodales. Nam vitae lectus id lectus tincidunt ornare. Aliquam sodales suscipit velit. Nullam leo erat, iaculis vehicula, dignissim vel, rhoncus id, velit. Nulla facilisi. Fusce tortor lorem, mollis sed, scelerisque eget, faucibus sed, dui. Quisque eu nisi. Etiam sed erat id lorem placerat feugiat. Pellentesque vitae orci at odio porta pretium. Cras quis tellus eu pede auctor iaculis. Donec suscipit venenatis mi.

Aliquam erat volutpat. Sed congue feugiat tellus. Praesent ac nunc non nisi eleifend cursus. Sed nisi massa, mattis eu, elementum ac, luctus a, lacus. Nunc luctus malesuada ipsum. Morbi aliquam, massa eget gravida fermentum, eros nisi volutpat neque, nec placerat nisi nunc non mi. Quisque tincidunt quam nec nibh sagittis eleifend. Duis malesuada dignissim ante. Aliquam erat volutpat. Proin risus lectus, pharetra vel, mollis sit amet, suscipit ac, sapien. Fusce egestas. Curabitur ut tortor id massa egestas ullamcorper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec fermentum. Curabitur ut ligula ac ante scelerisque consectetuer. Nullam at turpis quis nisl eleifend aliquam. Sed odio sapien, semper eget, rutrum a, tempor in, nibh.


Exporting to Unix/Mac Thunderbird

If you want to export to Thunderbird for Unix or Thunderbird for Mac, and you don't have Thunderbird installed on your Windows system, you can still export to a Thunderbird folder structure by checking the "To Thunderbird" option and selecting any arbitrary base folder for the export.

The "Courex.sbd" sub-folder (and an empty Courex mailbox file) is still created automatically under the folder you select. After the export, the whole folder structure under the selected folder can be copied to "Local Folders" (or any other folder you choose) in the target Thunderbird system. If none of the Courier folder names conflict with folders already in the "Local Folders" folder of the target system, you can treat the Courex.sbd folder as the "Local Folders" root. You can also rename the Courex.sbd folder before you copy, but if you do this, remember to preserve the ".sbd" extension, and give the 0 bytes "Courex" file the same name as the folder's root name.

The same comments about the secondary files, Address.csv, Accounts.txt and Export.log, apply as for exporting directly to a Thunderbird system under Windows. That is, they are written to your "non-Thunderbird" export folder, not to the same folder as your email messages.

To repeat:

Secondary files will NOT be written to the same folder as the Thunderbird mailbox files. To see and change where they will be written, uncheck "To Thunderbird". The secondary files will be written to the "Courex" subfolder of whatever path then appears in the "Export Destination Folder" text box. Then recheck "To Thunderbird". This will restore the mailbox folder to the "Export Destination Folder" box.


Exporting to eml/mbox files

This section describes "non-Thunderbird" exports using a standard folder structure.

Courex exports eml and/or mbox files to individual folders which preserves your Courier folder structure. Courex creates the folder tree from the base "Export Destination Folder" which you specify, starting with a 'Courex' folder.

If you don't specify an "Export Destination Folder" it will default to your Courier 'box' file folder if this was found at startup. If no 'box' file was found automatically, the destination folder will default to 'C:\' (thus, the export will be to 'C:\Courex').

For example, if you specify a base folder for export of "D:\Email" and you store your emails in Courier according to year, such as "Sent Mail\2005", "Sent Mail\2006", etc., Courex will export all mails from "Sent Mail\2005" into folder "D:\Email\Courex\Sent Mail\2005". If you selected "Create mbox" files. D:\Email\Courex\Sent Mail\2005 will contain a file named "2005.mbox".

The name of the eml files, if produced, is derived from the UTC adjusted date and time of the email. Thus, alphabetical order is also date/time order. Courex uses this to enter eml files into mbox files in date/time order. Courex also uses the eml file names to detect potential duplicates. If two messages have exactly the same date and time, and thus the same eml file name, an entry will be made in the Export.log file and the suffix 'A' (and 'B'. 'C', etc. if necessary) will be appended to the eml file name.

The mbox file produced via eml files will differ from that produced directly. The directly produced mbox will contain messages in the order they were encountered in the Courier database, while that produced from eml files will contain messages in date/time order. That is, the mbox files will contain the same messages, and will be the same size, but the order of the messages will be different. Potential duplicates can only be detected if eml files are produced, so the Export.log file may differ too.

An 'eml' file contains one email in the same form in which it was received or sent. That is, it will usually consist of only 7-bit ASCII characters (extended characters in various international character sets are represented by combinations of 7-bit characters) and will have a maximum line length of 76 characters. It is complete with header, body text and attachments, binary attachments being usually encoded in "base64" format (a way of representing 8-bit bytes using only 7-bit printable ASCII characters). You can open an eml file in a text editor and read it (though it might be difficult to understand if it contains a lot of extended character encodings and/or if it is in html form and, of course, binary attachments will simply look like strings of random characters).

A 'mbox' file contains multiple 'eml' files, divided by a separator line. Thunderbird uses the mbox format as its native database format, which is why it was relatively easy to extend Courex to include the special Thunderbird support.

The 'eml' and 'mbox' files should contain the email exactly as it was originally sent or received. But because of the way that Courier stores messages in its database, requiring them to be reconstructed, this is almost never the case for emails exported by Courex. However, the exported emails conform to RFC822 and MIME standards (that is, they are in transmissible form) and have the same appearance and contents as the original email (unless they have been edited by the user within Courier).


Cancelling the Export

The progress dialog has a "Cancel" button. Pressing the "x" button on the progress dialog has the same effect. You will first be asked to confirm the action:

While this message is on the screen the process continues, it is not paused. If you confirm, the present message being processed will be completed and the export process will be shutdown. While this is going on you will see the following message:

When the export process has been shutdown, you will be presented with an "OK" button.

When you press this you will be returned to the setup dialog.

If you cancel an export partway through, you will be left with a partial export which should be valid up to the point at which it was interrupted. If you subsequently start the export process again to the same destination, any previous partial (or complete) export will be overwritten. If you re-export to Thunderbird, the indexes will need to be built again by Thunderbird, and all messages will again be marked as unread.


The Export.Log File

The Export.Log file contains a (hopefully short) list of messages that Courex isn't totally sure it handled correctly (but it may have done), or which have well defined problems, such as missing attachments. Writing this list out to a file allows you to give special attention to these messages after import if total accuracy is important to you.

It may be that some of these messages have small problems that can be corrected manually. It is even possible to re-attach missing attachments with the right utilities if you still have the original files available. The ability of Courex to output to individual eml files assists in this exercise. A defective eml file can be processed manually then imported individually.

Note: I have never seen a case of Courier itself losing an attachment - attachments are usually only lost in export/import between other clients or by manual editing. From version 1.1, Courex will automatically re-integrate separated attachments detatched from the original message by a Courier filter rule (that is, it will read the external file, if found, base64 encode it, then re-attach the encoded file to the message).

An example Export.Log entry is the following (entries are separated by a blank line):

Received Mail  Visit to Brazil - Final Schedule  Fri, 8 Dec 2006 08:27:49 -0500

20061208082749 - Two or more messages are concatenated together, separation has been attempted

The first line has three parts; folder, subject and date/time. The second line has two parts; the eml file name and the reason for the entry into Export.Log. The second line was not present in Courex version 1.0, it was added for version 1.1.

The email format date/time allows you to find it easily amongst your imports. The file name format date/time allows you to find it amongst your eml files, if created. You will find this message, for example, as:

My Export Folder\Courex\Received Mail\20061208082749.eml

The full list of reasons for entering a message into Export.log are:

· Two or more messages are concatenated together, separation has been attempted.
· Possible duplicate, same date and time as another message (eml output only).
· Unrecognized Courier index record version number (x).
· A mandatory field in the header seems to be missing.
· The header date/time is missing or invalid (it will probably be defaulted to 1 Jan 1980 00:00:00).
· The main header content type is not one of the common types.
· One or more indicated attachments seem to be missing (empty or detached).
· The message has more than 100 attachments (the first 100 will be output).

If you get a very large Export.Log file please report it. Normally, a maximum of one Export.Log entry for every one hundred messages exported is considered reasonable.

Version 1.1 also creates a "Folders.Log" file along with the Export.Log file. This lists all of the folders detected by Courex in your Courier mailbox file, both message folders and non-message folders.


Courex Error Messages

It is hoped that you never see an error message, but in case you do they are explained below. The most likely time to get an error is immediately after you click the "Start" button, when Courex does a number of checks. A typical error message looks like this:

When you click "OK", you will be returned to the setup dialog. The following error messages are possible, where <mailboxfile> or <outputfolder> are replaced with the actual file or path specifications.

<mailboxfile> does not exist

Courex has failed to find your Courier box file and/or you have typed the name of a file which does not exist into the "Courier Mailbox File" textbox.

Cannot open <mailboxfile> - Is Courier running?

The mailbox file is locked by another application. The most likely cause of this is that Courier is running.

<mailboxfile> is not a valid Courier mailbox file (x)

The input mailbox file does not conform to the expected characteristics of a Courier mailbox file. There are a number of different ways this message may be generated, so it is followed by a number ('x' above is replaced by the number).

<mailboxfile> does not contain any email messages

The mailbox file you specified is a valid Courier mailbox, but it appears to be empty.

Cannot create or write to <outputfolder>

If you type a non-existent path into the "Export Destination Folder" text box, Courex will attempt to create it when you press "Start". If it fails, it will generate this message. The most likely cause is that a folder name contains an invalid character, but it may be that the folder is on a read-only disk or doesn't have write permissions. If you are performing an export to Thunderbird, this message might apply to the Thunderbird folder or the non-Thunderbird folder (which are different).

Records linkage error at location x

The Courier mailbox file appears to be corrupt. Running DBTool on it (part of Courier) may resolve the problem. If it does not, please report it (including the number which replaces 'x').


Epilogue

 Top Previous

Courier is a registered trademark of Rose City Software. Courex is independently-produced, is not a part of Courier and has no connection with Rose City Software.

Grateful thanks to all who helped test Courex, in all it's versions, and provided valuable suggestions for its development. Without their contributions, Courex would not work as well as it does on such a wide variety of mailboxes, would be less usable and would be missing several important features. Special thanks to Manlio Fierro, beta-tester extraordinare, who single-handedly drove the development of version 1.1.

While every effort has been made to ensure that this software fully meets fitness-for-purpose expectations, Courex comes without warranty of any kind. It's author will not accept liability for any loss or damage, direct or consequential. If you are not prepared to take proper precautions and assume all risks of using this software, then do not use it.

Courex is copyrighted software. It is free to evaluate and use for personal use. If you wish, you may make an optional monetary donation, but this is completely voluntary and the software provided for download is fully functional. If you profit from use of Courex, such as use in a commercial environment, you are expected to make a proportionate donation. If you are an impoverished student (for example) please don't feel guilty about using it for free.

Courex may be freely distributed providing that no charge is made for it and the ZIP archive is distributed in its entirety, including documentation. The distribution package is certified to be free of malware of all kinds (no spyware, no adware, etc.).

Courex is copyright © 2007, Laurence Jackson. All rights reserved.

If you discover any serious issues with Courex I want to hear about them.

If an updated version is produced it will be made available here.

Courex will run under all versions of Windows from Windows 2000, including Vista. It will not run under earlier versions.

For public discussion of Courex please see and use WindowsBBS.com