Cloud Export is a tool to automatically extract your data from web applications and save it to your local file system for backup purposes, but more extensive than Google Takeout. Plans are based on http://www.dataliberation.org.
ImapArchiver is a tool which can be used to save the all imap account into a local directory/archive. The ideal objective is to used it with cron to automatically make a back up of your imap account
Create email archives getting IMAP mailfolders or POP3 mailboxes. Search emails by sender/receiver/subject/body among already existing backup files (i.e. on dvd) in plain or compressed format. Tested on Linux-x86, Linux-PPC and Windows-XP platforms.