Download all mail messages from Gmail including Sent folder items

101

23

How can I download all the messages from a Gmail account, including the Sent folder items, when a normal POP fetch will only grab the inbox items?

My wife recently died, and she gave me access to her Gmail account. While I'm not sure whether or not I want to read the messages in there, I do want to make a backup copy of both the sent and received messages. Ideally, the backup copy would be accessible to me offline, though this is not strictly necessary.

I could grab the inbox via POP3, but that wouldn't get me the sent messages. I have desktops running Windows, Mac OS X, and Linux.

I have legal access to the account and I'm not interested in any future emails, only in the current state of her inbox.

ChrisInEdmonton

Posted 2012-02-08T14:36:11.920

Reputation: 8 110

In any case, depending on the amount of mails, you might need to wait for quite a bit, since – if I recall correctly – the download rate is limited after a number of messages. – slhck – 2012-02-08T14:54:55.483

Thanks. There are a few thousand messages, but it's not a problem if it takes a while to download. – ChrisInEdmonton – 2012-02-08T15:02:06.257

172Allow me to pass along our collective condolences. I cannot imagine... – uSlackr – 2012-02-08T16:02:13.443

13I second uSlackers comment, I too could not imagine my life without my wife. My deepest condolences to you. – Paperlantern – 2012-02-08T17:51:53.220

22Thank you, everyone. It does indeed suck. I'll refrain from commenting further as superuser isn't a chat forum, but I appreciate all your help and comments. – ChrisInEdmonton – 2012-02-08T19:54:22.477

Answers

78

You can setup an email client to download the entire contents of the account including sent mails if you configure IMAP access. The following settings work for me in Thunderbird although you can probably use any standard email client that you prefer.

Server: imap.googlemail.com or imap.gmail.com
Port: 993
Security: SSL/TLS
Authentication: Normal Password

Once you have downloaded the contents of the inbox you can then save and backup the contents of that mailbox by using the appropriate feature in the email client.

You will also want to check Settings->Labels and ensure all labels have "Show in IMAP" selected (by default, Chats are not).

Good luck to you and sorry for your loss.

Mark S.

Posted 2012-02-08T14:36:11.920

Reputation: 1 289

Is there a way to ensure at Google side that the IMAP client does not make any changes to the account? I am somehow concerned about bugs/vulnerabilities in my mail client, and do not want to give it permissions it does not need for my use case, – Abhishek Anand – 2016-04-03T16:37:16.340

1All were good answers, but this one specifically listed settings in Thunderbird which would work, so I'm accepting this one. Thanks. – ChrisInEdmonton – 2012-02-08T15:02:55.553

18

Chris, I'm very sorry for your loss. If you choose IMAP, please make sure that you download the full message content and not just the headers. Some IMAP clients download the headers only by default, and in this case, the emails will not be properly backed up. Here is information for Thunderbird: http://kb.mozillazine.org/Offline_folders

– Sarah Price – 2012-02-09T00:57:40.307

29

I'm very sorry to hear about your wife.

I just wanted to add, you might want to download other data other than Gmail, if she used other Google services. See the "Google Takeout" project here:

https://www.google.com/takeout/

MakeUseOf just happened to post a tutorial on Google Takeout and IMAP backups recently.

dotnetengineer

Posted 2012-02-08T14:36:11.920

Reputation: 617

Thank you! She didn't use other google services as far as I know, but I'll definitely check that out. And it will be a useful link for others in a similar situation, I'm sure. – ChrisInEdmonton – 2012-02-08T19:53:48.203

9

This does not apply to free Gmail accounts, but is worth mentioning for Google Apps accounts (the paid kind):

The Google Apps Email Audit API lets you request a GPG encrypted export in mbox* format of a complete user mailbox or a partial export by date or search query. There's a command line tool called gam, which makes this as easy as:

gam audit export request <user>                  # returns a request_id
gam audit export status                          # until status = COMPLETE
gam audit export download <user> <request_id>

You'll also need to generate and upload a GPG key to Google Apps prior to this (and decrypt the downloaded files with this key afterwards).

* Supported by almost all email clients

Ingmar Hupp

Posted 2012-02-08T14:36:11.920

Reputation: 435

8

First, my condolences.

As everyone has (correctly) said, you want to use IMAP.

For backup, I'd personally use a non-GUI email client though. This will make it easier to backup. And with IMAP, you can still use other clients, like Thunderbird, if you want them to be easier to read.

If I was in your situation, I'd use Fetchmail on Cygwin. Luckily enough, there is already written a tutorial for this at Lifehacker.

Rich Homolka

Posted 2012-02-08T14:36:11.920

Reputation: 27 121

5

Use IMAP4, it will allow browsing messages directly on the server, as well as copying them out. Practically any desktop IMAP client will allow you to mark all messages and drag them into a local folder, or into your IMAP mailbox. (At various occassions I've tested Thunderbird, Evolution, mutt, Windows [Live] Mail, Outlook, Eudora, and Outlook Express.)

Batch downloads can be done using getmail or OfflineIMAP, on Linux or OS X.

(By the way, the custom POP3 server used by Gmail does, in fact, include sent messages, although it has other limits.)

user1686

Posted 2012-02-08T14:36:11.920

Reputation: 283 655

3

You may want to take a look at MailStore Home (completely free for personal usage). You can backup emails from nearly every account in one single application. See http://www.mailstore.com/en/mailstore-home.aspx

ssc

Posted 2012-02-08T14:36:11.920

Reputation: 31

Sorry if this is a newbie question, but the FAQ didn't tell me: why is my answer voted down? Was it to short, not helpful (why?). Or because i answered a question for which another answer was already accepted? My answer itself i still believe to be helpful for other user having the same problem as Chris – ssc – 2012-02-10T13:59:52.763

your answer was marked as spam by community members, hence the auto downvote and deletion. Sorry about that, [su] gets a lot of spam, and sometimes false positives happen. My apologies. Perhaps it would be worthwhile mentioning that you're not affiliated to the product to prevent such a thing. Once again, I apologize & welcome to [su]! – Sathyajith Bhat – 2012-03-02T19:08:47.533

2

Long after I posted this question, google added a feature to make it much easier to download all of your email from gmail. This blog post describes the process, which I will summarise.

Go to https://www.google.com/settings/takeout/custom/gmail,calendar. Note that this link, by default, allows you to download your calendar and your mail, but you can download data from other products by clicking on Show more products. When you click Next, you are given the option of choosing your file type and delivery method. The defaults are probably appropriate, so just click Create archive. Once google has archived your data, they will send a download link to you.

ChrisInEdmonton

Posted 2012-02-08T14:36:11.920

Reputation: 8 110

1

The best method would probably be to set up Gmail to allow IMAP access, then download everything with an IMAP client. Via IMAP you can see all messages, both sent and received.

Jonathan Callen

Posted 2012-02-08T14:36:11.920

Reputation: 204

1

Thunderbird and Evolution has very good IMAP support. imapcopy for linux will enable you to backup the data in another IMAP account. you can label all the email from another account using filters.

P.S.: if you don't know how to use the software, http://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapcopy

DragonSlay3r

Posted 2012-02-08T14:36:11.920

Reputation: 187

you could take a look at http://teamflawless.org/2012/installing-and-using-imapsync-on-ubuntu/ . imapsync seems to work for me on migrating one account to another

– Quamis – 2013-12-09T12:52:17.937