Archiving your GMail box

March 2017

GMail services are very nice, but if you lose your GMail account,then you will be in serious trouble.

Note that: It is better to make a backup of your data.

Here is a program that can download and archive all your emails in your GMail (inbox, archived and sent (including attachments), with the exception of spam folder).


  • Have a GMail account with IMAP enabled in the configuration
  • Have Python 2.5 installed.

Getting started

  • Go to this link
  • Save the program into a Python file and run it with Python.
  • Enter login and password, and wait.


  • You'll get a file: yourlogin.mbox.
  • This is a standard mailbox file that can be opened with almost all email client software.

Original FAQ by Sebsauvage on CCM!


Published by deri58.
This document, titled "Archiving your GMail box," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (