Bild einer Blume

MBS2MBX - a Small Tool for Opera 7

There is Always Enough Space for One More Tool on Your HDD! - kgm)

Software
Opera-Tool
Mbox merge
Mbox Import
Benfords Law

Eclipse
Eclipse und C/C++

Office
Excel Balkengrafik
Excel Farben

Artikel
Computer rechnen anders!
Impressum

MBS2MBX - What is it good for?

Important hint: Development of this tool has been discontinued. Use Operas Mail export function instead.

MBS2MBX is a conversion tool that reads e-mails from Opera's e-mail client M2 and saves them as mbox files. Mbox is a quite wide-spread file format and can be imported by different e-mail clients. Opera is a well known browser, please visit www.opera.com for further information!

Application examples:

  • Backing-up e-mails. Export your e-mails into mbox-files with MBS2MBX and save them on CD. You can re-import the mbox files to your e-mail application afterwards.
  • Transporting e-mails from one computer to another. With MBS2MBX you can provide a mbox file - containing all the e-mails of the first computer - and import it into Opera on another computer by using the e-mail import function.
  • Testing e-mail programms. If the e-mail client to be tested can read mbox files, you can convert your M2 files and test your other e-mail client with your real e-mail by importing the mbox file into the other client.

What are the system requirements for MBS2MBX?

Despite the fact, that this tool was created and tested on a Windows 2000 system, it does not use any special Windows 2000 routines, so it is assumed that it works with all recent Windows versions. Release 1.6 should in principle run under Mac OS X and Linux but this is hardly tested, please give me a feedback about the workability.
The script is written in Python, which is is a very interesting scripting language. The Python development environment has to be installed on your computer to run this script! You can download Python at: www.python.org. The script is tested with Python 2.4 (use a 2.x Version). After you have downloaded and installed Python, Windows associates file extensions .py and .pyw to Python files so that you can start the Python scripts with a simple doubleclick.

How to install MBS2MBX?

To run MBS2MBX, you need to download the ZIP file (see below) and unzip it into a folder of your choice. It can be started by a doubbleclick at mbs2mbx.pyw.

Operational instructions for MBS2MBX

Before you use MBS2MBX, please make a backup of your Opera files, especially of the MBS files in your mail\storage\ folder! In fact MBS2MBX uses the files read only, but it is always safer to backup valuable files before dealing with them.

Ease of use:

  1. Just select or type in the path to your Opera MBS files (you can determine the correct path by looking under «Help→About Opera...» when Opera is running). All MBS files from this folder will be read by MBS2MBX.
  2. The second path is the path to the folder, where you want the mbox files to be saved to.
  3. As an option, you can separate your e-mail adresses into different accounts. If you do not select this option, all e-mails will be saved in one mbox file, just like in older versions of this tool. If you activate this option, you have to provide the path to Opera's account.ini file.

For a first test, a small mbox1.mbs is packed to the ZIP file, containing 2 normal test-e-mails and 1 corrupt one (more about this later).

The dialog window of MBS2MBX looks like this:

screenshot MBS2MBX

That's all, just press the button "Start Mbox-conversion"!

If you didn't activate "separate e-mails", 5 mbox files will be created:

o7mails.mbx:
This file contains all error free e-mails (read later in this text how MBS2MBX checks for errors). Most of your e-mails should be here after conversion.

o7news.mbx:
Here you can find all of your messages containing a news-header, so to say every message you have received from or send to your subscribed newsgroups.

o7bugs.mbx:
In this file you can find all corrupt e-mails. It is no 100% check, because the mails are checked for valid From and Date entries in the header section only. Both entries should be present in every e-mail.
One little side effect is, that all drafts go into this file too, but this is not a bug because they don't have a complete header yet.

o7empty.mbx:
In this file you can find the "Empty" e-mails - that is: e-mails without a text part different to just spaces or linefeed/returns.

o7dupes.mbx:
This file is for e-mails found more than once! MBS2MBX checks this by looking at the Message-IDs or, if the Message-ID is missing, at a calculated MD5 "fingerprint" of the e-mail header. If the ID or the fingerprint is unique until the check, e-mails will be sorted into the file o7mails.mbx and news into o7news.mbx. If the ID or the fingerprint has been detected before, the message will be copied into this file.

These 5 files are in stored as mbox format and can be imported into Opera via the mbox importing funktion in the «Import...» dialog. The files in o7bugs.mbx should be checked with a text editior before, because sometimes it is possible to restore a valid header from the context of the message. You have to insert a header with a formally correct syntax, of course. The best way to achieve a correct header is, to copy the From and the Date header from a similar, formal correct message and change the values to your needs.

o7mbx.log:
Here you can read all error messages and all status informations of the last conversion. You can find these informations at the end of the conversion in the program's status window, too.

Log-file example with deactivated "Select Opera's "accounts.ini" file to separate e-mails according to e-mail accounts":

Source: c:\storage-test\
Destination: c:\mbox-kopie\

Message from  c:\storage-test\mbox365.mbs, line 1
written to c:\mbox-kopie\o7bugs.mbx, line 1:
Warning, this message contains NO TEXT!

Message from  c:\storage-test\mbox540.mbs, line 1
written to c:\mbox-kopie\o7bugs.mbx, line 75:
Warning! This message contains no "From:" header!
Warning! This message contains no "Date:" header!

Message from c:\storage-test\mbox63.mbs, line 1
written to c:\mbox-kopie\o7news.mbx, line 13112:
Note: "From" was replaced by ">From" in line 13156 in this message.

4360  e-mails copied to c:\mbox-kopie\o7mails.mbx
410   News copied to    c:\mbox-kopie\o7news.mbx
1     Bugs copied to    c:\mbox-kopie\o7bugs.mbx
8     Dupes copied to   c:\mbox-kopie\o7dupes.mbx

4779 E-mails converted in 20.22 seconds!

During this conversion, one empty e-mail (containing no text) was found. The report shows you, in which source-file and line this message started and in which destination file and line you can find the message now. Furthermore there were other e-mails, in which the From and Date headers were missing.

You may be interested in the reported issue
Note: "From" was replaced by ">From" in line XXXX in this message.
too. This line will occur, if there is a line in the body part of a message that starts with "From " (quotes to show that there is a trailing space only, please ignore). Per definition, lines starting with a "From " are the beginning of a new e-mail in the Mbox-format. If MBS2MBX finds a line like this during conversion, they have to and will be changed to ">From". If MBS2MBX would not do this, every e-mail client would assume, that those lines were the starting lines of a message and, as a result of the conversion, there would be 2 corrupted or empty messages instead of 1 correct message containing a line with ">From" in the body part of the message.
Note: As a result of this operation, the content of this message is not a 100% original any longer! This can cause damage to PGP/GPG signed messages. Handle those messages with care!


The next example shows the logfile with activated the option separate e-mails according to e-mail accounts:

In this example two accounts are used for demonstration reasons: klaus.meyer@irgendwo.de und anna.mueller@anderswo.de.

Source: c:\storage-test\
Destination: c:\mbox-kopie\

E-mail accounts found:
klaus.meyer@irgendwo.de
anna.mueller@anderswo.de

3633  e-mails copied to c:\mbox-kopie\o7klaus_meyer_irgendwo_de.mbx
552   e-mails copied to c:\mbox-kopie\o7anna_mueller_anderswo_de.mbx
450   e-mails copied to c:\mbox-kopie\o7mails.mbx
290   News copied to    c:\mbox-kopie\o7news.mbx
0     Bugs copied to    c:\mbox-kopie\o7bugs.mbx
5     Dupes copied to   c:\mbox-kopie\o7dupes.mbx

4930 e-mails converted in 23.10 seconds!

In this example MBS2MBX found the two e-mail addresses klaus.meyer@irgendwo.de and anna.mueller@anderswo.de in the accounts.ini and creates, additionally to the standard files, two more files with filenames derived from the account e-mail addresses. If an e-mail contains one of these addresses in its header, the e-mail will be sorted into the appropriate Mbox file. During the address comparison MBS2MBX analyzes the From header first, if there is no match, the other headers like the CC, BCC etc. are used to find out, if the message belongs to a standard account or to a "special" account. If there is no match in any header, the e-mail will be sorted into o7mails.mbx.

MBS2MBX update to support Opera version 7.5-8

Opera has changed the format of the MBS-files. Please use only MBS2MBX starting from version 1.5 and use Python version 2.3 or newer.

MBS2MBX - important changes

  • Select or type in the path to your Opera MBS 'store'-dir. Below the 'store'-directory Opera creates a subdir for each one account. Within the subdirs are the MBS-files. Select the 'store'-directory and all MBS files from all subdirs will be read by MBS2MBX. A typical path:
    c:\...\opera\opera75\mail\store\
  • There is one new option 'Don't copy Operas Mailheader-extension "X-Opera-Status" into new Mbox-files'. Opera inserts this Headerline for internal purposes into the MBS-Files. Using this option you can prevent, that this line is taken over into Mbox-files.
  • A few error messages adjusted.

MBS2MBX config-files

You have the option to put a myaccounts.ini file in the folder where you placed your copy of MBS2MBX. In this file you can define your own e-mail adresses to be sorted by. This is extremly useful if there still exist messages of old, no more used (and such not in the accounts.ini), acounts. A sample file of myaccounts.ini comes with the distribution of MBS2MBX.

MBS2MBX remembers the last used options and paths in the file mbs2mbx.ini, which can be found in the installation folder of MBS2MBX.

Some tips for free

  • Empty your SPAM and your Trash folders before you start MBS2MBX! If you don't do this, all of your SPAM and Trash will be imported into the MBX files and you have to sort them out by hand or filter afterwards.
  • If you open mbs2mbx.pyw with a text-editor, you can edit some of the preferences. You can find then from line 15 to line 18 and they are annotated.

Hints, possible problems, etc.

  • In the according dialog to "Select path to MBS folder" you have to select the first file that comes along (any of the files will do, as long as it is a MBS file ;-)), however all files in that folder will be converted. The path selection does not work with hidden files (Opera's profiles folder can be hidden dependent to the kind of installation and the system), so in this case the "File-Open" Dialog was used, what results in this little annoyance.
  • MBS2MBX needs exactly the MBS-files as used by Opera 7.x. If Opera ASA ever changes this syntax, MBS2MBX has to be adapted.
  • MBS2MBX accesses the MBS files read-only, if you do not want any additional sorting, no other files are needed. The accounts.ini file is accessed read-only, too.
  • MBS2MBX can not repair fragmentary or (syntax) corrupted files.
  • All conversion times, mentioned above, are taken with a Celeron 1.3GHz running Windows 2000.

Last, not least: The download link :-)

Just to remember: It might look like a program as you know it, but it is a Python script! You have to install Python first, before you unpack (unzip) the downloaded ZIP file into a folder of your choice. If you have done that, all you have to do to start the script is: Doubbleclick the file mbs2mbx.pyw!

You can use MBS2MBX at own risk, no liability, no warranty!

Download (up to Opera 7.23): mbs2mbx_en_v_1_2.zip (approx. 6 KByte)

Download (Opera 7.5): mbs2mbx_en_v_1_6.zip (approx. 6 KByte)

You can send questions and comments by e-mail.

Mailadresse als Bild (wegen Spam leider nötig...)
Top     Home Valid XHTML 1.0!

Translation by Roland Reck