How to archive a Gmail account using Thunderbird
I never use the GMail web interface unless I’m on the road. Instead I POP my email into my Apple Mail program. The downloaded email is not erased from GMail (like traditional POP servers). Instead it is stored in the “All Mail” archive along with all my sent messages, too. After a year and a half, I’ve used 2600 MB of my 2800 MB email box (thank you Google).
Having 200 MB of free email space used to be a lot. But today, it’s simply not enough and I’ll run out of space within the next few months. I could go through and delete my old email. But I hate to do that. I’ve had experiences in the past where finding an old message is invaluable.
Before I switched to GMail, I would archive my email in a folder on the Mail program. At the end of the year, I would archive that folder into a file on the computer. If I ever needed to find an old message, it would be waiting for me.
Now with the GMail system, I use the Mail program as a reader only. I delete messages the instant I’m finished with them (because I could always find the information on GMail).
So how do I make an archive of my GMail account?
The answer is to use a temporary email program to download the whole GMail archive. Then sort and save the old messages into a file on the computer.
- Delete useless old email from GMail first. It will reduce how much you have to download by a lot. Get to know GMail’s search terms such as before or has. I used “before:2007/01/01 has:attachment”. I then went through those and deleted a lot of messages that had large attachments. Keep any message you have any doubt about. I also used “before:2007/01/01 from:firstname.lastname@example.org” to identify and remove system messages from the bulletin board.
- Download Thunderbird from mozilla.org. Install the program, but don’t tell it to use your GMail account, yet.
- Get all your latest messages using your existing email client (Apple Mail for me).
- Go to the web interface for your GMail account. Go to GMail settings and disable POP. Sign out of GMail. Sign back in. Go to settings again and enable POP for “all mail” (even mail that’s already been downloaded). Sign out to save.
- Start Thunderbird. It has an option to set up a GMail account. Select that. Put in your username and continue. It will ask if you want to download the GMail account right now. Say yes and put in your password.
- It will download the messages in groups of about 400 at a time. I had to keep hitting Get Messages until I had all my messages from December 2005 until the end of 2006. This took a while. Be patient. I don’t want to archive 2007. I will do that in January 2008.
- Sort the messages by size and remove any large messages that you know you don’t need (or that you missed in cleaning up at step 1). I have a lot of these. Mostly photographs or documents that I’ve already saved on my computer.
Thunderbird now has over 4000 messages in it’s inbox. These are both messages I’ve sent as well as received. I’ve cleaned out a lot of cruft. I removed any stray messages from 2007. Now the inbox is ready to be archived.
- In Thunderbird. Empty the trash. Then select the GMail account and compact the folders (File>Compact Folders).
- Quit Thunderbird (don’t just close it.)
- Go to your home directory, Library, Thunderbird.
- Click on the randomly named directory, then mail, and finally pop.gmail.com
- The file called Inbox is the archive. Copy it to an archive location on your computer.
- Rename the file to something useful: 2006 Email Archive
If the file is still taking up a lot of space, zip it.
And finally, you need to remove the email messages from GMail.
- Log into your GMail account
- Search for all the messages you just archived. I put “before:2007/01/01” in the search box.
- Click “All”, then click “Select all conversations that match this search”
- Go to trash and empty trash
- I went from using 2600 MB to only 157 MB.
- Remember to remove your sent mail (before January, 2007) from Apple Mail
- I removed the Thunderbird profile (HOME/Library/Thunderbird)
- The process took two hours
- All mail not downloaded by Thunderbird got dumped into Apple Mail.
- Recommend doing this only in January