Opening a .msg file in Ubuntu

149,740

Solution 1

This is an MS-Outlook format. There is a command line tool called MSGConvert (see www.matijs.net/software/msgconv) which converts .msg files into .eml. You can open those with Thunderbird or Evolution. On Ubuntu you should be able to install the tool using

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

from a command line. Use

msgconvert *.msg

to convert every file in a directory at once. MSGConvert will produce copies of your .msg-files with the suffix .msg.eml. Regardless, your friend should learn how to send content properly.

Solution 2

Hie, Even though there are a lot of Answers available but not of them are simple and easy to use so I am posting this Answer.

Use Microsoft one drive to open .msg files online via browser

Sign in to your Microsoft onedrive account and upload the .msg file. After upload, you can click on it to view the file contents.

and advantage over other answers is you won't be sharing your file with third party file converters.

Note: This method is Non-OS specific and can be applied in any OS.

Solution 3

It's not perfect but you can import .msg file with Mozilla Thunderbird (it works with on 52.1.1 on my Linux Mint). I had some encoding error but you can globally read the content.

In Thunderbird you click on File > Open > Saved message and select your .msg file.

Solution 4

Try this link: https://www.coolutils.com/online/Mail-Converter/

I came to this post searching for an answer, found the above link which did the job for me. Hence wanted to share here.

If you are concerned about privacy, you can buy their desktop version and convert it.

Solution 5

Another free and cross-platform tool for extracting the contents of an Outlook msg file from the command line is msg-extractor.

pip install extract-msg
extract_msg file.msg

Please note that while package name uses hyphen, command name uses underscore.

https://pypi.org/project/extract-msg/

Share:
149,740

Related videos on Youtube

lockstock
Author by

lockstock

Updated on September 17, 2022

Comments

  • lockstock
    lockstock over 1 year

    Someone sent me a .msg file on Skype, and somehow I just can't open this in Ubuntu.

    Is there any app in which I could open the .msg file?

    • Admin
      Admin over 14 years
      This could be many things...what type is this file? There are several different programs using the msg extension.
  • quack quixote
    quack quixote over 14 years
    obviously, replace "foo.msg" with the name of your .msg file.
  • Martin Thoma
    Martin Thoma almost 11 years
    It gives Composite Document File V2 Document, No summary info and is an Outlook file for emails. See also How do I view an Outlook .msg file?
  • Dallaylaen
    Dallaylaen over 8 years
    Somehow msgconvert didn't appear in the path, but the following worked: perl -we 'use Email::Outlook::Message; print Email::Outlook::Message->new(shift)->to_email_mime->as_strin‌​g' foo.msg >bar.eml
  • PottyBert
    PottyBert about 8 years
    Just to note, on debian based systems the msgconvert script isn't in the package. You can get it from the repo however here: github.com/mvz/email-outlook-message-perl
  • Dessa Simpson
    Dessa Simpson about 8 years
    Just curious, why all the downvotes? Seems like a perfectly good tool.
  • bragboy
    bragboy about 8 years
    @VirtualDXS - Life is harsh, isn't it ? :)
  • slowhand
    slowhand almost 8 years
    I also downvote this "solution", because it violates privacy. .msg files sometimes contain mail threads, which must be kept confidential.
  • slowhand
    slowhand almost 8 years
    Using the msgconvert tool from github.com/mvz/email-outlook-message-perl, the command line ./msgconvert file.msg produces nothing. You have to use ./msgconvert --outfile file.eml file.msg.
  • Axel Beckert
    Axel Beckert over 7 years
    If you already did apt-get install libemail-outlook-message-perl, you don't need to do anything more. That package already contains /usr/bin/msgconvert, at least on Debian 8 Jessie.
  • cottontail
    cottontail over 6 years
    I don't get where the tool violates privacy. It's just a wrong statement. It's the same saying Winrar violates privacy because sometimes .rar files contain files which may be confidential. Or an SQLite client violates privacy because you can read Skype conversations from .db file.
  • Scott - Слава Україні
    Scott - Слава Україні over 6 years
    @AndreFigueiredo: It’s the difference between an online tool and a local program.  When you process data with WinRAR or any other program on your computer, the data stay on your computer (unless it’s infected with spyware). But with this “coolutils” solution, you upload your file to their website and then download the result.  Do they immediately delete your data off their servers?  Are their personnel allowed to look at your data?  Do they sell your data to other people? Once you give it to them, it’s out of your control.
  • Greg Schmit
    Greg Schmit over 5 years
    I think this should be a comment
  • Pierre-Olivier Vares
    Pierre-Olivier Vares about 5 years
    For my case, with this method, the file is totally unreadable.
  • Qwertie
    Qwertie about 5 years
    This kind of works. I can see a plain text message at the top with a lot of issues under it but I think it has got the text content of the email right.
  • Jaakko
    Jaakko over 4 years
    I wish I could edit the message also.
  • Akhil Surapuram
    Akhil Surapuram over 4 years
    @Jaakko .msg files are email conversation thread. I coundn't find any sense of editing it. I think you can copy text content for forwarding mail purposes
  • Stéphane
    Stéphane over 4 years
    There is no encoding error it simply than the encoding of the Outlook file (*.msg) is ANSI. I have the following in my .bash_profile : function msgread() { msgconvert --outfile - "$1" | iconv -f ms-ansi -t utf-8 | less }
  • radistao
    radistao over 4 years
    despite that fact this is not a solution for the problem, in some particular cases your suggestion works very good!
  • Akhil Surapuram
    Akhil Surapuram over 4 years
    @radistao thanks for the compliment. I say you don't have to convert the file to open .msg you just need to use Microsoft tools. for ubuntu, it's only in web and an electron version i.e nothing but the web. & yeah it definietly solves the problem of viewing .msg and therefore it can be treated as solution :P
  • rpr
    rpr almost 4 years
    After opening a .msg file on the OneDrive (using current Google Chrome) I can read the message body but I don't see a way to open attachments contained in the message and listed on the Attachments line.
  • Akhil Surapuram
    Akhil Surapuram almost 4 years
    Does it contain any attachments? are you able to view attachments in outlook on windows?
  • Saaru Lindestøkke
    Saaru Lindestøkke over 3 years
    Isn't a docker container from someone just the same as a random package?
  • cfstras
    cfstras over 3 years
    kind of, but you gain at least some form of isolation through docker and most importantly don’t clutter your system with a bunch of perl packages.
  • Kostrahb
    Kostrahb about 3 years
    +1 for rational note at the end
  • David
    David about 3 years
    this is bad, because you do not get the pictures
  • David
    David about 3 years
    Best feasible solution, the rest is crap.
  • Darius.V
    Darius.V about 3 years
    People should convert .msg files to smth like pdf before sending to not get poeple such problems opening. Most computers can open pdf without installing anything additionaly or sending to webservice like this.
  • neuhaus
    neuhaus almost 3 years
    The disadvantage of this method is that you will be sharing the email with Microsoft.
  • neuhaus
    neuhaus almost 3 years
    This works but doesn't preserve the mail headers.
  • neuhaus
    neuhaus almost 3 years
    This "answer" doesn't answer the question.
  • Akhil Surapuram
    Akhil Surapuram almost 3 years
    LOL @neuhaus Microsoft owns outlook. They already have your entire outlook inbox, not just that email with you are trying to read by drive upload.
  • neuhaus
    neuhaus almost 3 years
    @AkhilSurapuram no they do not have your email if you use Outlook on your own Exchange server.
  • Michał Leon
    Michał Leon almost 3 years
    Doesn't seem to work. Most likely cause: Windows uses UTF16, while Linux uses UTF8.