Have you ever subscribed to a new mailing list and wanted to read all the old posts in your email reader? Here’s how to do it. We will use the Fedora Development list mail archive for January 2010 as an example.
1) Navigate to the mail archives by clicking on devel Archives.
2) Download the gzip’d file for January 2010 from the archives page: http://lists.fedoraproject.org/pipermail/devel/ We’ll start with one month. You can do multiple months if you like.
3) Click on the link [ Gzip’d Text 773 KB ] and save the file to a place you can remember.
4) Unzip the file.
$ gunzip 2010-January.txt.gz
It becomes:
2010-January.txt
5) Copy the file to Thunderbird’s local storage directory.
$ cp 2010-January.txt ~/.thunderbird/*.default/Mail/Local\ Folders
The Mac OS X location is:
~/Library/Thunderbird/your.profile/Mail/Local\ Folders/
6) Close Thunderbird and restart it.
7) Scroll the folder list all the way to the bottom until you come to the “Local Folders.”
8) Open “Local Folders” and look for a folder called “January-2010.txt”
9) Now you can read all the messages there or copy them to another location–maybe a folder on your IMAP server.
To import multiple monthly mail archives into one folder unpack each gzip file individually and then cat them all to a single file. Copy the concatenated file to the same local Thunderbird directory. Restart Thunderbird and you are in business. I like to do something like this:
$ gunzip *.gz $ for i in $(ls *.txt); do cat $i >> full-mail-archive; done $ cp full-mail-archive ~/.thunderbird/*.default/Mail/Local\ Folders
A list of all Fedora’s mailing lists is at http://lists.fedoraproject.org/mailman/listinfo/. A similar listing of all of Red Hat’s public lists is at http://www.redhat.com/mailman/listinfo/
Automating the process
Matt Hicks wrote a script to automate this process. Check out mailman-download on github.
May 21, 2020 at 2:26 am
I can confirm this works using Thunderbird 68.8.0 on Debian testing. I saved the mail archive page (which lists all the *.txt.gz), modified the html and passed it over to kget to download the actual files.
Then unpacked them with gunzip *.gz and cat’d them together cat *.txt >> foo
While Thunderbird was closed I copied foo to its hidden dir. The new emails appeared once I started Thunderbird.
Thunderbird took a few seconds to create a new view.
The mailman list I added had about 40,000 messages so it took Thunderbird about 5 minutes to move the messages to another dir.
I now have about 40,000 emails to read!!
May 21, 2020 at 8:45 am
I love it! Thanks for the feedback and letting us all know it still works in the year 2020. 🙂
January 15, 2013 at 1:10 am
Just to let you know, this worked perfectly on Mac OS X 10.6.8 with Thunderbird 12.0.1 Thanks!
January 18, 2013 at 11:35 pm
Awesome! Thanks for letting us know.
December 23, 2012 at 5:43 am
This:
for i in $(ls *.txt); do cat $i >> full-mail-archive; done
Should really be written like this:
cat *.txt > full-mail-archive
November 28, 2011 at 8:00 am
This is kind of a nit-pick, but in your shell for loop you should just use shell expansion of *.txt instead of $(ls *.txt). This is because if you (for instance) have ls aliased to “ls –color” and text files are listed with color you have issues trying to cat $i them. Even if this doesn’t affect you, the ls ends up being totally extraneous because it does $(ls *.txt) -> $(ls ) -> output from ls. Where as for i in *.txt is directly to the point.
Other than that, it was very useful to do this and it worked for me on Linux with Thunderbird 8.
October 19, 2011 at 4:41 am
I’ve tried this with Thunderbird 6 on Windows and it doesn’t work… The folders appears to be empty, even if the .txt files are not…
Any ideas?
Thanks in advance.
October 19, 2011 at 5:17 am
Interesting. I don’t know. I haven’t tried this on Windows and I don’t see why it would be any different. When I last used this routine it was on Thunderbird 3… granted the versions are reving really fast right now so it’s hard to know if that means anything.
March 17, 2011 at 11:27 am
Thanks a lot! Your post helped me keep my sanity 😉
December 23, 2010 at 11:22 pm
I was searching for a tool/application for mailing list archive reading.
Thanks for a very helpful post.
In addition to this once you have the archive txt imported in Thunderbird Goto View -> Sort By -> Threaded
This will give you a hierarchy for each topic (helpful for reading)
Thanks again.
-Arun
September 28, 2010 at 8:08 pm
I was wondering if anybody had tried to use this trick to “clean-up” mail from some of the lists that contain fairly verbose trailers about unsubscribing and other functions at the end of messages.
My thought was to backup the message file and the .MSF file, use a Perl script to copy the message file up to the trailer, ignore the trailer and resume copying a “From” occurred at the beginning of the line and replace the old message file with one that came from the Perl script.
March 5, 2010 at 10:55 am
Very nice trick. I’ve been wondering about that for a long time… and there’s no way you’r going to find it in the mozilla docs…
thanks.
February 10, 2010 at 7:33 pm
Wow, I had NO IDEA you could do that. What an incredibly useful tip, thanks!!