15

How to open a mbox file? Mutt displays no mails when calling mutt -f sent.mbox.

The mbox format is "From" without colon.

Is there any mbox viewer for Linux?

Thank you in advance.

guntbert
  • 13,475
chris
  • 786

5 Answers5

7

In thunderbird you can open the file by placing it in thunderbirds local profile folder, under $HOME/.thunderbird/<profilename>.default/Mail/Local Folders/ An .mbox file there will be picked up by Thunderbird and displayed. See also the detailed instructions linked by prashanth in a different comment.

JanKanis
  • 683
4

Any text editor is capable of opening .mbox. Besides text editors Mozilla Thunderbird can open them too.

Rinzwind
  • 309,379
4

The first line of the mail is the “envelope From line”. It begins with the 5 characters From␣ where is a space character. This is normal.

From Christian xxx <cg@xxx> Mon May  15 20:22:35 2010

What is unusual is that the email address is between <…>. This is unusual. I don't know if it's against the RFCs or not, but I can see Mutt chokes on it.

You should get a valid mailbox (as in, one that Mutt can parse) by processing the mailbox file through the formail command from procmail Install procmail.

formail -ds sed '1 s/^From .* <\(.*\)>/From \1/' <sent.mbox >sent-reformatted.mbox
mutt -f sent-reformatted.mbox
4

After a bit of nightmare on Windows with Firefox, where the .mbox gets open but only the first message is available, I found that Evolution works well: I created a new folder and then from File\Import... (I'm from Italy, the menu it's actually Importa...) I was able to read that old messages...

CapelliC
  • 285
0

In order to view an mbox file in Thunderbird, I needed the following:

  • add the Import/Export extension, otherwise the "import" option in the Tools menu did not give me the option to import a file (only data, etc., from another account/app); and
  • to use an account which was configured for POP, not IMAP (since the import into IMAP is not possible -- at least with the mbox file I was importing).

With those two conditions in place, everything worked well, and the file was available "as mail" in Thunderbird after import (with attachments intact).

Dɑvïd
  • 2,186