Email archiving: PST to mbox

I usually create folders into which email gets sorted – either by me or by some program like sieve – which are valuable during the lifetime of some project. When that project ends, however, the only thing that mail is good for is aiding my poor memory. Thus, I might as well have it in a great big text file so it becomes easier to search, i.e., grep. It turns out that the “E” command in pine, if executed while a folder is selected, will do just that. Finally, something simple. 🙂 What is actually happening is that there exists a format called “mbox” which is a one-flat-file-per-folder email structure. This is great, as it is effective both while the folder is in active use and for searching once the folder is just an archive.

I also had a lot of old old email on an old machine which runs MS Outlook. I was able to successfully convert all that mail to flat files also. I exported all the mail into a “pst” file, which is the format which Outlook uses to store its mail. I then copied the pst file to my linux machine, where I used a utility called “readpst” to convert the archive file into a series of files, each of which is an mbox file containing the contents of each folder from my pst file. This is the default behavior, and it was exactly what I wanted. “readpst” is available as a Debian package, so you can just `apt-get install` it. Sweet.

The coolest part about all of this is that these “mbox” files are compatible with just about anything, so if I ever want to bring all that mail back into a nice graphical client, it should be easy.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s