Perl script to read .dbx files

Tuesday, June 16th, 2009

A customer asked me to filter a .dbx file (Outlook express) and extract some data. This script reads the .dbx and prints it in a readable format.

#!/usr/bin/perl
use Mail::Transport::Dbx;

my $dbx = eval { Mail::Transport::Dbx->new( “Customer_List.dbx” )};
die $@ if $@;

for my $msg ($dbx->emails) {
my @bodxy = $msg->body;
print @bodxy;
}