Email Archiving, Outlook and Thunderbird

This page describes the procedure for handling saved emails from Outlook and Thunderbird.

Outlook stores saved emails in *.msg format, which is a binary proprietary format. Thunderbird saves emails in *.eml format, which is a non-proprietary multi-part MIME format.

The nature of *.msg files make them impossible to share with Thunderbird or other email clients. Thunderbird has its own problems - while it can save emails, it can not open the saved files! (Update: TB has been fixed, and it can now open its own files!)

To get around these problems in a mixed Outlook/Thunderbird environment, I use two steps:

  1. Convert the Outlook *.msg files into *.eml, using Matijs van Zuijlen's excellent msgconvert.pl Perl script, available at http://www.xs4all.nl/~mvz/software/msgconv.html. This script works on one file at a time, so I've written a batch file to scan a directory and convert all *.msg files into *.eml files, if the *.eml file does not already exist. The batch file source code (v1.0) is available here. You'll need to change the variables in the configuration section. I run the script as a cron job on a nightly basis.
     
  2. Use a perl CGI script to present the saved *.eml files through a web browser. Fortunately, this is easy using the Perl MIME::Explode module. (If this module is not installed on your system, install it from the command line using:
    perl -MCPAN -e 'install MIME::Explode'
    
    I've written a perl script that uses the module to display saved email files through a web browser, with the attachments shown as hyperlinks. The CGI script source code (v1.0) is available here. You'll need to change the variables in the configuration section.

Providing standard and customized test solutions since 1975

Copyright © 2015 Avtech Electrosystems Ltd, All Rights Reserved