Converting MSG to EML

Submitted by Jochus on Sun, 03/01/2010 - 23:03 | Posted in: Linux

Today, I received a MSG file (which is related to the Microsoft Outlook fileformat) in my mailbox. I was unable to open the file in Ubuntu, so I had to find a solution!

MSGConvert

By using Google, I was able to find a script which converts my MSG file to an EML file: http://www.matijs.net/software/msgconv/


Perl

The script is written in Perl, so you need ... Perl

$ dpkg -l perl
ii  perl                                  5.10.0-24ubuntu4                      Larry Wall's Practical Extraction and Report Language

If you don't have Perl, install it:

$ sudo aptitude install perl

Perl dependencies

I was missing some dependencies. You can install them using the following command:

$ sudo perl -MCPAN -e 'install ##REPLACE_BY_PACKAGE_NAME##'

The list I installed:

  • Email::Outlook::Message
  • Email::LocalDelivery
  • Getopt::Long
  • Pod::Usage
  • File::Basename
  • Message::Simple
  • Email::MIME::Creator
  • OLE::Storage_Lite
  • File::Path::Expand
  • Email::FolderType

Running the script

$ perl -w msgconvert.pl ##MY_MESSAGE.MSG##

Happy converting! ;-)

Comments

Submitted by Anonymous (not verified) on Mon, 14/11/2016 - 14:56
 

Just Email::Outlook::Message should be enough from CPAN now and it now includes the msgconvert script.

Add new comment

The content of this field is kept private and will not be shown publicly.

Full HTML

  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.