Programmatically export E-Mails from NSA loving E-Mail Providers

Does anyone know an open source tool, which can export all e-mails from a provider like Google Mail, Hotmail, Yahoo or similar?

Obviously, one can do that with Thunderbird, but it’s cumbersome and I think it only works for a certain amount of e-mails. If you have more than 10,000 e-mails, then Thunderbird won’t help much, as far as I know.

—===OOO===—
Yes.
—===OOO===—

2 Likes

Great info! But I’m afraid, it won’t work in Windows.

1 Like

Even if it won’t work on Windows, it will still work better than on Linux. :wink:

You should try and let us know, please!

1 Like

When Gmail was shutting down Legacy Gmail I moved north of 82,000 emails from one account, 15k and 4k on two others and then between 60k, 20k, 20k and 20k on not-for-profits – all with Thunderbird. Yes, it will do it. Yes, its slow. I did it all those accounts plus a few other smaller accounts in TB on one computer. If there is another way (because I do not trust them not to do it again but I moved back because sadly the alternatives out there mostly sucked) it would be great!

Speed is not a problem for me. I just want as little manual involvement as possible. Ideally, I just wanna press a couple of buttons and then come back 8 hours later to see if it’s finished. I don’t want to babysit it for hours.

That is why I went with TB - set it up and walk away.

Okay, the last time I tried to do it, it did not work this way in Thunderbird. I guess, I must’ve made a mistake. Will try out soon, to see how it goes.

You ran it on windows probably?

1 Like

No, then it would’ve worked, obviously.

The deceptive memory…

1 Like

There is a helpfull article in the germany computer magazine ct.de from heise.
They suggest for example open source tool: imapsync.

You can translate the article.

Thanks for that.

I actually used Thunderbird and it worked pretty well.

The key to success was the following tool.

It allows lots of possibilities of export.

I had to sort all mails inside the inbox by retrieval date, ascending, so it will start downloading the oldest mail possible and finish with the most recent one.

After hours of downloading and a couple of download interruptions, as the server was apparently getting tired, I just had to select all mails, right click, then choose one of the options provided by the extension linked above.

Worked great. Problem solved.

There is also something about this tool which wouldn’t have made it work, anyway.

Imapsync can’t backup nor restore email messages to or from a local directory. Imapsync works only with IMAP accounts, which always belong to some IMAP server.

Source

It would, if you set up an IMAP server locally.
Another way would have been GitHub - OfflineIMAP/offlineimap3: Read/sync your IMAP mailboxes (python3)
:smiley:
But it doesn’t have a GUI :confused:

Yes. And even if it had one, I am sure it would take more time to do it this convoluted way. Doing it the way I described earlier is very convenient and easy. Not much to horse around, like people are used to on Linux, most of the time.

That said, this way does not solve the original problem in any way. The problem was getting out all e-mails from an account. I don’t want to transfer it to another account, because then I would still need to extract them from the other account.

Problem already solved, so just a sidenote:

OfflineIMAP is software that downloads your email mailbox(es) as local Maildirs .

This is a worse job of “solving” the issue, because you would need to do further manual processing. This is not an export. It’s more or less like POP3. However, exporting usually implies the choice of the format the content should be exported as. For example, with the solution I portrayed earlier, it is possible to export it to PDF, HTML, plain text with attachments or without, etc…

Wow. 10000 emails in a pdf. Awesome. :sweat: