Thursday, September 09, 2004

Archiving Outlook

I’ve finally discovered a useful reason to keep a blog ;) – it’s a good place to write down how you did something (solved a problem) so you can, by some fluke of a chance, go back years later and recover the solution. Of course, with problems and solutions that involve technology, chances are you’ll never run across the same problem again (at least not in the same form), but hey, at least you can show the world how you did it.

My problem was that of properly archiving Outlook email. For years I’ve used Outlook for both work and personal email and have throughout those years archived emails to Outlook’s proprietary .pst file (Personal Folder File) format. PST files are great in that in one giant file you can store it all – emails, contacts, calendar and task items, etc. The problem with them is they can really only be opened by Outlook and when Outlook opens one, it needs read/write access to the file. This later point isn’t a big deal until you’ve burned all of your PST files to a CD-ROM. Outlook can’t open them when they’re sitting on a CD, which is a read-only format. So in the untimely event that you want to search for an email, you have to copy each PST file from your CD to some place that’s read/writable (like your hard drive). Typically the PST files are quite large so this can be a very cumbersome and painful process (especially if after the search you still didn’t find that email you were looking for).

A more desirable archive format would be to have all of the emails in separate text files that conformed to the RFC-822 format (circa 1974 or whatever date that RFC hit the streets). These files typically have the .eml file extension and just about any email client can open them (hehe, except Outlook). If you don’t have one handy you can always use good ‘ol Notepad.
Unfortunately the road from PST to .eml was a bit rocky and I had to play around with several different techniques to finally find a process that seemed to work well. My first thought was to import all of my email into Outlook Express. You can drag and drop emails from Outlook Express to Windows Explorer and it will create individual .eml files for each email for you automatically. Unfortunately, it has a very limited file naming scheme (it uses {email subject}.eml as the file name); if two emails have the same subject, it doesn’t know enough to give the second .eml file a unique name. The other thing is it would be nice to have more control over names of the .eml files. Names with only the subject in them don’t make for very easy browsing.

Fortunately, someone out there had the same opinion and developed an application called Express Archiver. This handy app reads the folder structure of an Outlook Express profile and allows you to archive the contained messages in a number of ways, including as separate .eml files. It also allows you to customize how those .eml files are named. I chose to use the {date}{from}{subject} as the naming scheme of my Inbox emails and {date}{to}{subject} as the naming scheme of my Sent Items.

This application worked very well. The only “difficult” part was jumping between Outlook, Outlook Express, and Express Archiver to move emails from the PST format all the way to the nice archive-friendly .eml file format. But once I got the hang of it, it wasn’t too bad. As a final touch I was able to zip up all my .eml files and they compressed down a smaller size than even the PST files did. They can also live on a CD and I can browse and search them without having to use Outlook or copy them to my local hard drive.
Very cool!