I made this tool backup my emails. It is called gmail-backup (cause I use gmail) but it should work with any imap server using ssl. It has been developed with python 3.6.2
. I don't know if it will work with python2. Let me know but PR are welcome ;)
The installation is quite straight forward:
git clone https://github.com/teintuc/gmail-backup.git
cd gmail-backup
sudo python setup.py install
Just run:
gmailbackup
The first time it will ask you some configuration in order to properly work.