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!


By using Google, I was able to find a script which converts my MSG file to an EML file:


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 ##MY_MESSAGE.MSG##

Happy converting! ;-)


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.


  • 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].
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.