75

I need to view a .msg file. It is an email from Microsoft Outlook. How can I do this in Ubuntu?

4
  • similar question: askubuntu.com/questions/282691/… Commented Oct 14, 2016 at 12:19
  • At least with Thunderbird(45.8.0)->Open File it displays somewhat readable.
    – math
    Commented Oct 17, 2017 at 8:53
  • 1
    check this Answer for this issue: superuser.com/a/1472788/880537 Commented Aug 19, 2019 at 8:15
  • If you have access to outlook web access and only want to look at the message text, you could create a draft email message, attach the .msg file to it, then go to Drafts, open the mail from there by clicking on the attached message. It should show the contents of the mail, and also the attachments it has, but unfortunately the attachments of this message cannot be downloaded. (The described approach was not my idea, I found it in youtube.com/watch?v=bAqb8fQfIQI .)
    – anre
    Commented Apr 10 at 10:47

8 Answers 8

43

Building on Martin Owens answer, this is the quick solution:

wget http://www.matijs.net/software/msgconv/msgconvert.pl
sudo apt-get install libemail-outlook-message-perl libemail-localdelivery-perl libemail-sender-perl
perl msgconvert.pl YourMessage.msg
1
  • 4
    For Ubuntu 14.04 I also needed this package: libemail-sender-perl
    – bmaupin
    Commented Nov 13, 2014 at 14:08
36

Looks like the best thing to do is to convert them to an eml file using this script:

http://www.matijs.net/software/msgconv/

It's not pretty, it's not gui based, but it'll work.

3
  • 1
    After installing the script as indicated (cpan -i Email::Outlook::Message) found a quick way to call it: creating a "Nautilus Script" with: #!/bin/bash for arg do msgconvert "$arg" done
    – Stefano
    Commented Sep 30, 2014 at 7:28
  • 5
    I can install this on my computer with sudo apt install libemail-outlook-message-perl and then just msgconvert xyz.msg and I get a xyz.eml file
    – Jayen
    Commented Feb 20, 2019 at 10:56
  • Today the latest version is v0.920 and it still turns HTML messages into plain text messages
    – basin
    Commented Jun 28, 2021 at 20:02
23

I am on Ubuntu 15.10 and matijs'es msgconvert script seems to be available in the repos now. after running:

sudo apt-get install libemail-outlook-message-perl libemail-localdelivery-perl libemail-sender-perl

I can now now run

msgconvert *.msg

to convert the messages entirely with tools from the repos.

21

Open it with MsgViewer http://sourceforge.net/projects/msgviewer/

wget -O MSGViewer.zip http://sourceforge.net/projects/msgviewer/files/latest/download
unzip MSGViewer.zip
cd MSGViewer-1.9
java -jar MSGViewer.jar

now, just drag'n'drop the msg file to the program window to have its contents displayed.

4
  • MSGViewer is a nice program, but I found that the viewer wouldn't open an attached .PDF file within the .MSG file. It appeared to change the filename to something that it couldn't find.
    – Mr Ed
    Commented Apr 25, 2016 at 7:21
  • 1
    This works nicely. However I have some problems with the encoding of non ASCI mails (in my case Greek). Do you happen to know if there is any setting for this.
    – Bruni
    Commented Jun 22, 2016 at 16:22
  • This works with Java 8. Java 11, that I tried with first, removed the java activation framework this uses and so no longer works without some extra effort to use the replacement github.com/eclipse-ee4j/jaf
    – jwd630
    Commented Oct 16, 2018 at 1:49
  • Opening attached files (e.g. PDF files) worked fine for me after changing the OpenCommand from kde-open to xdg-open (MSGViewer setting).
    – nspo
    Commented Sep 20, 2019 at 14:43
4

I found after install msgconvert that msgconvert wasn't installed when I ran the command. Rather than faff about trying to debug it, I did this. Done in less than a minute. http://www.zamzar.com/convert/msg-to-pdf/

2
  • 3
    it doesnt handle attachments, so it's pretty fail imo Commented Oct 3, 2015 at 7:58
  • I converted from .MSG to .EML, and the attachments come through correctly. The .EML files was openable with Thunderbird.
    – Mr Ed
    Commented Apr 25, 2016 at 7:22
3

You can use ruby-msg ruby gem for that purposes. So:

  1. Install ruby and rubygems:

    # apt-get install rubygems gem
    
  2. Install the gem:

    # gem install ruby-msg
    
  3. Then use the "mapitool" utility:

    $ mapitool -i test.msg
    

    In some cases you can sporadically get the exception:

    /usr/local/share/gems/gems/ruby-msg-1.5.2/lib/mapi/mime.rb:109:in `join': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
    

    So just fix the following file lib/mapi/mime.rb with the following regexp:

    sed 's/part.to_s(opts)/part.to_s(opts).encode("UTF-8", :invalid=>:replace, :undef => :replace, :replace => "")/' -i /usr/local/share/gems/gems/ruby-msg-1.5.2/lib/mapi/mime.rb
    
0

With SeaMonkey program, Link please see below: http://www.seamonkey-project.org/

2
  • 1
    Where do you see that seamonkey is able to view those files? Add a detailed description please.
    – guntbert
    Commented Mar 19, 2015 at 14:10
  • Please install this program, after that from "File" menu choose "open file..." and choose your .msg file.
    – Davidgh
    Commented Mar 19, 2015 at 14:16
0

You can try using an online viewer such as:

https://msgeml.com

It displays the .msg message, provides download links for the attachments, shows the headers, and converts the file to .eml.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .