Ben Oliver
Exporting large Gmail mailboxes with imap-upload
"A safe, simple way to shift a shit ton of email"

I’ve been working on moving away from gmail, for a number of reasons. The primary one being that I don’t want to live under the domain anymore - I’d much rather have my own.

The main issue for me was - how do I shift all my emails to a new server (or service, in my case)?

There are imap sync services and programs out there but gmail limits the rate at which you can export stuff. It’s a shame, because going server-to-server makes sense otherwise. If you have a smaller inbox (less than 10k emails) I would do this instead. Look into imapsync.

I have 120k emails, so I needed a better solution.

Initially I tried a ‘move’ operation in Thunderbird but it crashed at about 3000 emails in, which already took quite a while. I like the software but I’m not sure it’s fit for purpose for shifting this amount of stuff.

What I did was simple:

Simple as that! The command I ran was:

python foo.mbox imaps:// 

I have a good internet connection but a slow PC, and it uploaded all 120k emails in a few hours.

Published by Ben Oliver, January 01 2018
© 2018 Ben Oliver