Friday, January 01, 2010

Open mbox file in Thunderbird

Unfortunately, there seems to be no straightforward way to ask Thunderbird to open or import an Mbox mail file directly.

Say you have an mbox file, and would like to view it in Thunderbird. For this example, we will view the file in a "temp-mbox" folder under Thunderbird's "Local Folders". The convoluted way which seems to work goes like this:

  • In Thunderbird, under Local Folders, create the new "temp-mbox" folder.
  • Exit Thunderbird.
  • Find your "Local Folders" directory in your profile. It may be something like "~/.thunderbird/random-string.default/Mail/Local Folders/". In there, you will find a temp-mbox and a temp-mbox.msf file.
  • Overwrite temp-mbox with your mbox file,
  • and delete the temp-mbox.msf index file.
  • Re-open Thunderbird
I needed to do this, because of another limitation of Thunderbird: it's poor search capabilities. Since the mails I wanted to group are on my own IMAP server, I did the search there, and put all the mails into a single file. What I wanted is all the last year's emails received from or sent to somedomain. The following got me a suitable mbox file:
mbox=somedomain-2009.mbox; search=@somedomain; \
find ~/Maildir/cur ~/Maildir/.Sent/cur -mtime -365 | \
while read f ; do \
if egrep "^(From|To|Cc):.*$search" "$f"; then \
  echo "From - " >>$mbox; \
  cat "$f" >>$mbox; \
fi; \
done
To achieve this using the TB search, I would have needed to:
  • Search Inbox without subfolders for "From contains @somedomain" or "To contains @somedomain" or "Cc contains @somedomain". This also searches previous years, and takes quite a while on my IMAP folder.
  • Save the search
  • Search Sent for "To contains @somedomain" or "Cc contains @somedomain".
  • Save the search
  • Create a folder for results
  • Open the first saved search folders, sort by date, and copy the 2009 mails to the new results folder
  • Repeat with the second saved search.

Labels: , , , , ,

14 Comments:

Anonymous Anonymous said...

Thanks for the awesome tip!

09 January, 2012 23:41  
Anonymous Sandesh Jagdale said...

While opening an mailbox file from Thunderbird 15.0, it is not necessary to delete the .msf file. In fact in my case, when I deleted the .msf file, Thunderbird 15.0 refused to start at all.

In my case I had a compacted 'Archive' Local sub-folder, under the Local Folders in Thunderbird, which created an 'Archive' mailbox file in my 'Local Folders' location.

So to re-open it, I had to create a 'Archive' sub-folder (i.e. same name as your mailbox file) under 'Local Folders' and then just had to replace the 'Archive' file created in 'Local Folders' location, with my mailbox file and Thunderbird was able to show me all the messages within the compacted mailbox, once I restarted Thunderbird.

13 September, 2012 06:38  
Blogger ab1jx said...

If you put the mbox files in a subdirectory of Local Folders this doesn't work. It tries to index the subdirectory. Put the mbox files in the root of Local Folders, let it index them, close Thunderbird, move them into directories, start it up again and all is right.

I downloaded some mbox files from lists.gnu.org by ftp and wanted them in folders by group. I had to index them then move them.

21 December, 2012 05:54  
Anonymous Anonymous said...

Thanks for the tip!

28 July, 2013 12:07  
Blogger Markmohan said...

Have a look here http://download.cnet.com/Kernel-MBOX-Viewer/3000-2369_4-76457818.html. You can find out here an excellent Freeware application for MBOX Viewer, which is well known as Kernel for MBOX Viewer. By using it, one can easily open MBOX file without dependency of Mail Client. For any other query visit http://www.nucleustechnologies.com/mbox-viewer-free.html

08 October, 2015 14:36  
Blogger Unknown said...

Nice Information, Except that we can also Open .mbox file by creating a New folder in Local Folders of Mozilla Thunderbird and Import the .mbox file in it. See here for more information about Thunderbird MSF File Viewer

14 December, 2015 08:04  
Anonymous Anonymous said...

It worked. Thx... :)

03 January, 2016 20:09  
Anonymous Anonymous said...

Hi,
Convert & View your MBOX mailbox to Outlook PST with “MBOX Converter” tool for both Mac & Windows. It converts multiple MBOX files to PST, EML, MSG & NSF.
Download the free demo from here: www.nboxpst.com

22 April, 2016 12:01  
Blogger Keith Gibson said...

This comment has been removed by the author.

07 March, 2018 13:00  
Blogger Keith Gibson said...

Thanks for sharing this information.. very useful

also refer OST to PST Converter :-
OST to PST tool to recover corrupt OST files very easily and convert OST email into EML, MSG, PST and HTML formats. OST converter is easy way to conversion of OST files into PST files. OST to PST software successfully supported all version of MS Outlook platform.

07 March, 2018 13:02  
Blogger Mahima said...

To open mbox files in Thunderbird, for that you can directly import your mbox file into Thunderbird as Thunderbird supports the mbox files. Or you can can use directly use this software to open mbox files in Thunderbird link

02 May, 2018 14:51  
Blogger Abrienne Jonethan said...

Open MBOX files in Thunderbird without installing Thunderbird on your system. The software also supports corrupted MBOX files and save the file into other formats like PST, EML, MSG, HTML, RTF. Get more about the software

09 May, 2018 11:46  
Blogger Steve Smith said...

Hi,
Get an effortless solution i.e. Free Thunderbird Viewer Tool to view Thunderbird Inbox emails without any alteration in formatting of emails. It allows you to just add Thunderbird mailbox and read Thunderbird emails without losing any data.

27 November, 2019 07:19  
Blogger Akash said...

The MBOX File Viewer tool allows users to view MBOX files as well as email attachments quickly. In addition, it allows you to see healthy or corrupt MBOX emails and other stuff from Google Takeout, Entourage, Google Vault, Apple Mail, Mozilla Thunderbird, Netscape, Opera Mail, and other email clients.

09 November, 2021 13:07  

Post a Comment

<< Home