Linux msg to eml

Opening a .msg file in Ubuntu [closed]

Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you’re trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question.

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?

This could be many things. what type is this file? There are several different programs using the msg extension.

10 Answers 10

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 

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.

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_string’ foo.msg >bar.eml

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

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 .

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.

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.

The 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.

@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

despite that fact this is not a solution for the problem, in some particular cases your suggestion works very good!

Читайте также:  Opera mail on linux

@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 😛

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.

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.

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.

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 >

Worked great for a couple of old Outlook messages I had failed to convert over. The messages were text only. Thanks!

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.

I ran across such a file as well (provided to me by a colleague who saved an email message in Microsoft Outlook). file(1) identifies the .msg file like so:

foo.msg: Composite Document File V2 Document 

Georg Jung’s answer regarding Matijs van Zuijlen’s perl-based msgconvert(1) utility steered me in the right direction. Although my system does not at the time of this writing have the msgconvert utility packaged, the install instructions on Matijs’ web page indicate using cpan as one way to install it:

cpan -i Email::Outlook::Message 

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.

I also downvote this «solution», because it violates privacy. .msg files sometimes contain mail threads, which must be kept confidential.

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.

Читайте также:  Dns probe finished nxdomain linux

@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.

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.

Источник

Конвертация *.MSG

FIXME

Microsoft Outlook сохраняет письма в специальном закрытом бинарном формате. Эти файлы с письмами, как правило, имеют расширение .msg. Ни один почтовый клиент для Linux не способен как-либо работать с msg-файлами. Но есть выход: специальный конвертор — ruby-msg.
Установка:

Использование:

В текущем каталоге появится файл some_email.eml, который можно будет открыть, например, программой Thunderbird.

MSGConvert — преобразователь *.MSG

Еще один вариант — msgconvert.pl. Для его использования нужно сначала установить несколько зависимостей:

sudo apt-get install libemail-localdelivery-perl sudo cpan -i Email::Outlook::Message

Необходимо загрузить, собственно, сам скрипт:

wget -O /home/user/msgconvert.pl http://www.matijs.net/software/msgconv/msgconvert.pl

Использование:

perl -w /home/user/msgconvert.pl /home/user/001.msg

Будет создан файл /home/user/001.msg.mime, который представляет из себя plaintext 1) . Если есть вложения, то можно либо сконвертировать их в файлы из Base64, либо загрузить письмо в почтовый клиент 2) .

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Perl script to convert Outlook .msg files to Thunderbird .eml files

craig552uk/MSG-Convert

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

Читайте также:  Узнать какая файловая система linux

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

A perl script to convert Outlook .msg files in to .eml files to read on Ubuntu Linux using Thunderbird.

Originally by Matijs van Zuijlen matijs@matijs.net
Later edits by Craig Russell craig@craig-russell.co.uk

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

You can configure Nautilus to open .msg files when you double-click them

  1. Right click any .msg file
  2. Select Open with Other Application
  3. Click the arrow next to Use a Custom Command
  4. Click the Browse button and choose the msgconvert.pl file

Now when you double click a .msg file, it will be automatically converted to a .eml file and opened in Thunderbird.

###—mbox —mbox
Deliver to the given mbox file instead of creating individual .eml files.

###—exec —exec
After creating output files, run the specified command with each output file as a parameter e.g. msgconvert.pl —exec thunderbird input.msg

###—verbose —verbose
Print information about skipped parts of the .msg file.

###—help —help
Print a brief help message.

By default the script will open the converted files with thunderbird, you can over ride this with the —exec option. Preferably the script would by default use no application, but Nautilus doesn’t allow you to specify options for ‘open with’ scripts. If you’d rather have no default application, simply change the parameter on line 19 from my $execute = ‘thunderbird’; to my $execute = »;

About

Perl script to convert Outlook .msg files to Thunderbird .eml files

Источник

Как прочитать .msg файлы Outlook Express в Linux?

Аватар пользователя admin

Самый простой способ — это конвертировать .msg файлы текстовый .eml формат. Тогда можно будет легко прочитать содержимое .msg файлов.

Для конвертации нам понадобится ruby и пакет rubygems. В CentOS или в Debian/Ubuntu всё это входит в стандартный дистрибутив.

Для CentOS:

# apt-get install rubygems gem

И затем для любого дистрибутива:

Данная команда скачает из репозитория gem’ов нужный и установит его в систему.

Далее. Допустим, ваш .msg файл называется test.msg. Необходимо вызвать команду:

которая создаст в этом же каталоге текстовый файл test.eml, который затем можно будет прочитать. Команда gem install ruby-msg обычно кладёт команду mapitool в /usr/local/bin, так что озаботьтесь, чтобы в переменной окружения PATH у вас был путь до /usr/local/bin или вызывайте команду mapitool с полным путём.

Дополнение от 28.12.2015

На некоторых файлах, вы можете получить ошибку такого вида:

/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)

Вот рецепт, который должен вам помочь. В файле /usr/local/share/gems/gems/ruby-msg-1.5.2/lib/mapi/mime.rb в строке 108 исправьте выражение:

part.to_s(opts).encode("UTF-8", :invalid=>:replace, :undef => :replace, :replace => "")

Источник

Оцените статью
Adblock
detector