Archiving your GMail box

October 2016

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!

Related :

This document entitled « Archiving your GMail box » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.