Backing up mail in Outlook Express using Python

Noah noah at noah.org
Tue Apr 16 12:47:22 EDT 2002


Hi,

How do you want to back up your Outlook email? 
If you want to keep it in Outlook format 
then you can just copy the BDX files.

Do you mean to convert your Outlook Express mail folder
into a plain text file? Say, into a standard UNIX mbox format?
The mbox format has the advantage that all email is stored
in one big, human readable text file and most (nay, all) UNIX
mail clients can read directly from this format.

The big trick is getting the email messages out of OE.
The OE DBX files are binary. I was unable to figure 
out how to do this from Python. What I did do was to 
find a Windows utility that would get me half-way there.

First, you need the DBXtract utility. You can find it here:
	http://chattanooga.net/~scochran/DBXtract.htm
This explodes your Outlook DBX file into a bunch of little files.
That may be all you need, but if you want to archive them
into a format that will let you read them on UNIX then you
need to convert the files into an mbox.

Second, you need my oesort script. This cleans up the
work done by DBExtract. I have attached a copy of the
script to this email. Hopefully the comments make it
somewhat clear as to how to use the script. This was
a quick ad hoc script, so it has not been carefully tested.
Use it at your own risk! Every once in a while I find that
an email gets left out of the final mbox file. I'm not sure
if that is the fault of my script or of DBXtract. It seems
to be 1 out of 100.

This person also has documentation on the OE format:
	http://oe5dbx.aroh.de/index.html

In the future do not store your mail in Outlook or any
other closed system. Make sure that your POP3 mail client
is configured to LEAVE MAIL ON SERVER (unfortunately, most
email clients default the wrong way). Or better yet, use IMAP.
I learned my lesson the hard way, which is why I wrote this script :-)

Yours,
Noah
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oesort.py
Type: application/octet-stream
Size: 11255 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20020416/cc98e793/attachment.obj>


More information about the Python-list mailing list