How to read Microsoft Outlook .MSG files in Linux

Discussions Regarding Software

Moderator: Moderators

How to read Microsoft Outlook .MSG files in Linux

Postby Fitzcarraldo » Tue Apr 29, 2008 16:08

I have literally thousands of .MSG files which I saved from Outlook Exchange Server several years ago and now want to access under Linux. However Linux e-mail clients cannot read or import Microsoft Outlook .MSG files or .PST files. Nope, not even Evolution, KMail or Thunderbird. At least with .PST files one could import them into Microsoft Outlook Express, export them in MBOX format and then import them into Evolution, KMail or Thunderbird.

But with Outlook .MSG files a guy named Matijs van Zuijlen came to the rescue with a Perl utility he calls "MSGConvert: A .MSG to mime/mbox converter". You can read about installing and using it on his Web site (http://www.matijs.net/software/msgconv/) but I thought I'd explain here how to install and use it, as his instructions may be confusing to newcomers to Linux and/or Perl.

1. INSTALLATION

Run the following commands when connected to the Internet, to download and install certain Perl modules and their dependencies from CPAN (Comprehensive Perl Archive Network):

perl -MCPAN -e 'install("Email::Outlook::Message")'
perl -MCPAN -e 'install("Email::LocalDelivery")'
perl -MCPAN -e 'install("Getopt::Long")'
perl -MCPAN -e 'install("Pod::Usage")'
perl -MCPAN -e 'install("File::Basename")'

Then download the Perl script msgconvert.pl (see the link "script itself" near the bottom of the above-mentioned Web page). I would suggest saving the script in your home directory.

2. USING MSGCONVERT

If the Microsoft Outlook .msg file you want to convert is called test_message.msg then you would type the following at the command line (not as root):

perl -w ~/msgconvert.pl ~/test_message.msg

and the file ~/test_message.msg.mime will be created.

If KMail does not open the .mime file, do the following:

a) select K Menu > Control Centre > KDE Components > File Associations

b) click on the "+" next to "message" to expand it

c) select rfc822

d) On the General tab, under Filename Patterns click on Add and add *.mime to the box and click Apply.

Notes for newcomers to Linux:
1. The tilde means "your home directory". So in my case I can type either "~/test_message.msg" or "/home/fitzcarraldo/test_message.msg".
2. Linux is case-sensitive, and test_message.msg and test_message.MSG are two different file names as far as Linux is concerned.
Last edited by Fitzcarraldo on Mon May 05, 2008 8:22, edited 1 time in total.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How to read Microsoft Outlook .MSG files in Linux

Postby xlnagla » Tue Apr 29, 2008 23:48

could you wiki-fy if you haven't already?

~xlnagla
xlnagla
Sagely Hen
 
Posts: 1078
Joined: Mon May 28, 2007 2:44

Re: How to read Microsoft Outlook .MSG files in Linux

Postby wolfden » Sun May 04, 2008 23:44

Thanks for adding to wiki!

:D
wolfden
Sharecropper
 
Posts: 9050
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA


Return to Software in General

Who is online

Users browsing this forum: No registered users and 2 guests

cron