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.
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.
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 .
formail -ds sed '1 s/^From .* <\(.*\)>/From \1/' <sent.mbox >sent-reformatted.mbox
mutt -f sent-reformatted.mbox
formail -ds sh -c 'cat >$FILENO.mail'
create? Can mutt read them as individual mailboxes containing a single mail?
Mar 18, 2012 at 22:20
From
line isn't of the form From something@somewhere trailer text
. In particular, it ignores a line where the envelope from address is John Doe <add@ress>
. Now I'm going to see how to fix this.
Mar 19, 2012 at 20:57
Any text editor is capable of opening .mbox
. Besides text editors Mozilla Thunderbird can open them too.
.mbox
file (takeout.google.com/settings/takeout) and open it with Thunderbird. All you have to do is place the .mbox
-file in the Local Folder path on your file system. Before that you must create at least a newsgroup account with your real email adress (write anything as the news server address, it doesn't matter). Restart Thunderbird and then you have a new folder with all your mails and attachements.
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...
In order to view an mbox
file in Thunderbird, I needed the following:
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).
From
line without a colon at the top: this is for the email's envelope. It's difficult to diagnose your problem without seeing the file contents. Of course I appreciate the file contents is probably too private to publish. Look at the file as a text file (for example withless
). Is theFrom
line followed by header lines (From:
,Subject:
and so on)? Is there aLines:
header, aContent-Length:
header?