Mbox2xml

Mbox2xml 2 Released!!

After well over 12,000 downloads of Mbox2xml, version 2 is finally released!

Mbox2xml 2 has better support for various character sets, generates more user friendly webpages and much more!

Scroll down to the download section now!

What is Mbox2xml?

Mbox2xml is an email archiver for Mozilla Thunderbird, which extracts messages from the mbox format used by Mozilla Thunderbird and stores them in an XML format, which can be viewed as web pages in a browser.

Backing up emails can be a cumbersome task, and the results are often not very user friendly nor easily accessible. These are the two main reasons why Mbox2xml was created.

We thought an email archiving tool should have the following properties:

  • Easy to use.
  • The archives should be easily accessible on any computer from any data storage device.
  • The tool should allow for automation so it can easily be integrated with existing back-up methods.

Therefore it was decided that the program should store the exported emails in an XML format which, together with a provided stylesheet, can be viewed in any modern webbrowser, no matter where the backup is stored. Also, XML is easily imported into existing software solutions. And finally, Mbox2xml has both a graphical user interface for ease of use, and a command line version for easier automation.

TOP

Download

Mbox2xml does not contain any spyware, viruses, trojans nor other unpleasantries. Mbox2xml may be used free of charge in a personal, non-commercial setting. Please contact us at tools@elit.nl before using it in any other situation.

Mbox2xml version 2.02.6

downloadlast updatesize
Mbox2xml windows installer

This installer can be run in 'silent' mode from the command line by providing the /S parameter. Add /D=<path> to install to a non-default location.

2010-03-10 16:49:427.58 MB
Mbox2xml 7-zip archive

This archive, in 7-Zip format, can be used for manual installation.

2010-03-10 13:46:315.19 MB

If you like Mbox2xml, then please consider supporting us with a small donation.

TOP

The Mbox Format

The email client for which Mbox2xml is initially designed, is Mozilla Thunderbird. This popular program stores the emails it receives in a format called Mbox, which is widely used by other mail programs. Although untested, Mbox2xml should be able to export emails from any Mbox file, whether it's created by Thunderbird or not.

Where to find the Mbox files?

In Mozilla Thunderbird, go to the 'tools' menu, and select 'Account Settings'. You'll see a configuration screen with settings for each email account. Select the 'Server Settings' for each account, to see where the emails are stored locally. Mbox files have no extension, and are named like the folders in Thunderbird (e.g. 'Inbox'). Mbox2xml can also search for Mbox files. See the manual section for more details.

Finally, there are two things you need to keep in mind:

  1. Thunderbird stores sent emails in a seperate Mbox file by default. Make sure you export both the Inbox and Sent folder if you want Mbox2xml to reconstruct your email conversations.
  2. Before using Mbox2xml, please make sure you let Thunderbird compact your mail folders. This will make Thunderbird remove 'junk' and prevent it from showing up in your export. If old junk mail still keeps lingering, please have a look here.
TOP

Features

Mbox2xml has the following features:

  • Extracts emails, including attachments, from one or more mbox files and stores them in XML files and attachment directories respectively.
  • Can generate an XSL stylesheet which transforms the XML into an easy to use webpage, which allows you to sort and browse the messages by date and thread.
  • Contains both a commandline version and one with a graphical user interface.
  • Emails can be exported for a given date range, or new messages can be appended to an already existing export.

Many other options can be specified both at the commandline or through the graphical user interface.

TOP

Manual

The graphical user interface offers a convenient way for you to combine multiple mbox files into one xml export. The selections you make and options you set can be saved in a file, so they can be easily reloaded next time you use Mbox2xml.

screenshot

The command line version can be found in your install directory under the name 'mbox2xml.exe'. This version can also use the configuration files created with the graphical version. Type 'mbox2xml -h' at the command prompt for further details.

The following table shows an overview of most the features and settings of Mbox2xml.

TOP
item description
Title The title to be shown at the top of your export pages.
Mboxes This element show a list of the mbox files you've selected for export.
'add' button Manually select an mbox file to add to the list.
'search' button Have Mbox2xml search a certain location on your hard drive for mbox files.
Destination The location on your hard drive to which Mbox2xml will write the exported messages.
'destination' button Browse for a location to which to export your messages.
Start Date & Time Click on the select box and choose a date from the pop-up calendar. All messages sent or received on this date or later will be exported. To remove a selected date, uncheck the box next to it. Use the time box below if you also want to add a specific time.
Append messages If you select this option and Mbox2xml finds a previous export at the given destination, then only messages newer than the newest in the old export will be exported and appended to the old export.
Overwrite This option tells Mbox2xml to overwrite any older exports found at the export destination.
Ignore attachments Mbox2xml will not export attachments when this options is selected.
Include stylesheet If this option is selected, Mbox2xml will include extra files to the export which make it viewable in any modern webbrowser.
Include raw header Use this option to force Mbox2xml to include ALL header information from your emails. This is generally not needed, but may suit advanced users.
Launch on complete When this option is selected, the export will be opened in your default webbrowser after the export is complete.
Messages per page If your export has more messages than indicated by this number, then Mbox2xml will devide them over multiple pages. This can be helpful when exporting large amounts of messages, since webbrowsers can have trouble rendering them in a single page.
Start Export This button starts the export process.
TOP

Changelog

  • 2010-02-23: Removed a bug that caused an error when ignoring attachments.
  • 2010-01-01: A new command line option has been added (-c ), which allows Mbox2xml to scan for mbox files each time it's run.
  • 2009-12-07: Various bug fixes related to the extraction of attachments.
  • 2009-11-21: Added horizontal scrolling to the Mbox list and fixed an error which could result in faulty XML.
  • 2009-10-23: Quick filters added to the web pages, for easy searching.
  • 2009-10-13: First release of Mbox2xml 2.0!
TOP

Feedback

We are very grateful for any feedback or suggestions you might give us. Thank you in advance!

Name (optional)

Email (optional, hidden from visitors)

Code Enter the number 13 twice.

Remark

Posts

Elit :: 2010-03-10 13:56:39

@Thomas:

Thanks for the report. It looks like some date data is badly/oddly formatted. You could help by opening the offending mbox file in a text editor (like Windows' Notepad), find the offending message and send at least the header information to us. Please make sure to remove any private information prior to sending.

In any case, we will adjust Mbox2xml soon to handle the error more gracefully, so the export will continue as it should, although some date(s) might be lost for the time being.

@John Ferris:

Thank you very much for the compliment!

TOP

John Ferris :: 2010-03-09 06:09:03

The improved style sheet is superb. Prior to using Mbox, I used to backup all my profiles onto a CD.
To find old emails meant having to have a seprate version of Thunderbird installed to recover the profiles.
Mbox style sheet lists all my emails back as far as january 2007 in lists of 50. (14570 emails altogether).
This has allowed me to clean out my mboxes and I now simply do an incremental backup once a month.
Totally satisfied with the simplicity of the program.
John Ferris
Muswellbrook NSW
Australia

TOP

Thomas :: 2010-03-07 17:38:18

Hello,

first thanks for the great tool! First I try'd to convert a relative small mbox file (mbox file with about 40 mails) to xml file and the reasult looked very pretty. So I thought of converting my mail archives containing about 270 mails in xml format but the tool failed with the error message:

Error while running export job!
Traceback (most recent call last):
File "controller.pyo", line 163, in run_job
File "indexer.pyo", line 86, in write_index
ValueError: year=9 is before 1900; the datetime strftime() methods require year >= 1900
18:14 - Export complete

There are a lot "message_xxx.xml" files generated but no "index.xml" when I export my mails of a whole year. I can reproduce the error with several other mail folders, so if you would like to have some more information please tell me.

I hope you can find the problem with the error message above.

Thanks a lot!

TOP

Elit :: 2010-02-26 13:54:42

Don't worry Dave, your and any feedback is greatly appreciated!

We're planning on taking Mbox2xml beyond the scope of Thunderbird and the mbox format, so it will support Outlook's pst format. When this will happen, we can not yet say.

TOP

Dave Ashton :: 2010-02-26 08:59:47

Oops. The message board has stripped the whitspaces I was trying to demonstrate

TOP

Dave Ashton :: 2010-02-26 08:58:24

Sorry I have a problems with the format of my headers. The general rule (from RFC822) is that wherever there may be linear-white-space (NOT simply LWSP-chars), a CRLF immediately followed by AT LEAST one LWSP-char may instead be inserted.Thus, the single line

To: "Joe & J. Harvey" <ddd @Org>, JJV @ BBN


can be represented as:

To: "Joe & J. Harvey" <ddd @ Org>,
JJV@BBN


and

To: "Joe & J. Harvey"
<ddd@ Org>, JJV
@BBN


and

To: "Joe &
J. Harvey" <ddd @ Org>, JJV @ BBN


I have checked the raw text mailbox files that I have produced by using readpst. There is not always a space following the carriage return in the folded lines. My mistake sorry!!

Once a field has been unfolded, it may be viewed as being composed of a field-name followed by a colon (":"), followed by a field-body, and terminated by a carriage-return/line-feed.

The field-name must be composed of printable ASCII characters (i.e., characters that have values between 33. and 126., decimal, except colon). Space is ASCII 32. So the Microsoft ones are non-conformant. Again my mistake.

TOP

Elit :: 2010-02-23 13:38:49

Hi Dave,

I'm not exactly sure what's going on there, but I suspect your mbox file is violating specifications.

We will look into it soon, to see if we can make Mbox2xml more robust.

TOP

Dave :: 2010-02-21 14:13:52

This program has some problems. Version downloaded and installed 21/2/2010 16:00 GMT+2:00

1)If the mail header includes
Microsoft Mail Internet Headers Version 2.0: Microsoft Mail Internet Headers Version
2.0
It stops reading the headers and puts the remainder of the mail into the body. Missing out subject to's, from's cc's etc
2) If a header field extends beyond one line e.g. if the mail has a long subject or a long list of to's the remainder of the header is not parsed correctly but put into the mail body.

TOP

Elit :: 2010-02-20 12:52:51

Hmmm, interesting suggestion.

It would be quite a bit of work, but who knows.

TOP

Numron :: 2010-02-18 12:59:44

Hi, thanks for the tool!
There is only 1 enhancement missing. If an export includes subfolders, the tree-structure will be lost after exporting. Instead of having a flat list of emails, I would rather geht a list with expandable subtrees.
Do you think this is something we will see in the futur?
Thanks
Numron

TOP

Elit :: 2010-02-13 20:17:16

That's a lot! Thanks for the compliment :)

TOP

Blair :: 2010-02-13 18:39:15

Great tool! Finally exported 19145 mails from the past 10 years with it. :)

TOP

Elit :: 2010-02-09 11:13:44

Please do. Just make sure you remove any private information prior to sending.

TOP

Blair :: 2010-02-09 08:40:35

Can I send you this specific data to the email address "tools@elit.nl"? I think this could be easier. ;)

TOP

Elit :: 2010-02-09 08:02:50

Hmm, some error is occurring while the "07.04.2008 17:57" date is being parsed. But what exactly happens is hard to tell, unless you manage to get me the date as it is stored inside the mbox file.

TOP

Blair :: 2010-02-08 21:24:35

Thanks a lot. It seems to work now without error message.

Now I started to cross check the XML export with the data in Thunderbird and found some few mails with the date "2000-01-01 00:00". But if I lookup them in Thunderbird the date is not the same. For example one mail is dated "07.04.2008 17:57" in Thunderbird and not "01.02.2000 00:00" like it is in the export.

Do you have any idea?

TOP

Elit :: 2010-02-08 08:26:59

Hi Blair,

Thank you for your report. Version 2.02.3 should resolve the issue you had.

Please let us know the results.

TOP

Blair :: 2010-02-07 20:54:56

Hi, I'm back. ^^

I tried to export several emails of the past years and I ran into an error message. There are a lot "message_xxx.xml" files generated but no "index.xml" when I export my mails of the whole year 2002.

I hope you can find the problem if I post the error message:

Writing messages...

Error while running export job!
Traceback (most recent call last):
File "controller.pyo", line 151, in run_job
File "controller.pyo", line 393, in _run_export_loop
File "mboxscanner.pyo", line 168, in message_generator
File "mboxscanner.pyo", line 201, in get_message
File "mboxscanner.pyo", line 326, in _process_email
AttributeError: 'NoneType' object has no attribute 'strip'

I can reproduce the error, so if you would like to have some more information please tell me.

TOP

Blair :: 2010-02-01 20:26:56

Tested it and it seems to work. I will run further tests when I have time to and give you feedback.

Thank you so much and keep up the great work. :)

TOP

Elit :: 2010-02-01 18:52:55

Version 2.02.2 has a new command line option:

-c <path>

If this option is given, Mbox2xml will scan that path recursively for mbox files, adding them to the list of other mbox files you might have specified.

Please let me know how it works out, Blair!

TOP

Blair :: 2010-02-01 06:54:11

Great to hear. I will check this page frequently for updates. :)

TOP

Elit :: 2010-01-30 16:25:26

Hi Blair,

Thank you for your feedback!

Seems like a very interesting feature you're requesting and it shouldn't be too much trouble putting it in, since all the needed components are already there.

Please keep an eye on this page, or sends us an email at tools@elit.nl, so we can notify you.

TOP

Blair :: 2010-01-30 15:57:59

Hello,

I'm testing this application right now (2.02.0) to archive a lot emails and so be able to delete them in Thunderbird afterwards. It seems to work very good after the first tests but I would like to suggest a new feature for the command line version.

It should be possible to give the command line version only one directory to start with and it scans this directory and subdirectories for mailboxes to process them automatically.

Some kind of this feature is in the GUI version available and you can save this session once it is scanned but it's not very comortable when you try to create automated jobs not knowing what changes are made in the Thunderbird mailbox folders in the meantime when you run it again some time later.

Is it possible to get such feature for the commandline version?

Greets
Blair

TOP

Elit :: 2010-01-03 22:13:51

We would just like to thank ms, since he helped us resolve a handful of bugs!

TOP

Older comments not shown...

Elit logo © 2000 - 2010 - last update:
W3C CSS W3C XHTML