jMailBackup is a small tool I wrote for backing up mails from my Google Mail account via IMAP/IMAP SSL.
Backup all mails. The EML files containing single messages will be stored in a new directory “mails”.
java -jar jMailBackup.jar -T imaps -H imap.gmail.com -U email@example.com -P mypassword -f "[Google Mail]/All Mail"
Convert them into MBOX format with the bundled script eml2mbox.rb.
ruby eml2mbox.rb mails $(pwd)/mails.mbox
You can now import the MBOX file into your favourite mail-client.
You can checkout the latest development version via Git. An Eclipse project file is included.
$ git clone http://git.dominik-geyer.de/jmailbackup.git
You may send an email to firstname.lastname@example.org.
jMailBackup is licensed under the GPLv3 license.
The included Java library JavaMail 1.4.3 is licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0.