/ Published in: Bash
Change 'username' (twice!) with your imap username,'password'with your imap password, and 'example.com' (twice!) with the url of your imap mailserver.
Works on: Ubuntu with Evolution, sqlite3 and archivemail installed.
Evolution is required because evolution stores the available folders in IMAP.
sqlite3 is requird to extract those available folders and recurse trough them.
This command looks up all the available folders in your imap box, recurses trough them and runs archivemail to archive all the online mail.
NOTE: remove the -n (dy-run) flag to actually archive the items.
NOTE: remove the -v (verbose) flag to be less verbose.
TODO: option to purge empty directories.
TODO: store username, password and mailserverURL in a $VAR.
Works on: Ubuntu with Evolution, sqlite3 and archivemail installed.
Evolution is required because evolution stores the available folders in IMAP.
sqlite3 is requird to extract those available folders and recurse trough them.
This command looks up all the available folders in your imap box, recurses trough them and runs archivemail to archive all the online mail.
NOTE: remove the -n (dy-run) flag to actually archive the items.
NOTE: remove the -v (verbose) flag to be less verbose.
TODO: option to purge empty directories.
TODO: store username, password and mailserverURL in a $VAR.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
for folder in `sqlite3 .evolution/mail/imap/username@example.com/folders.db "SELECT folder_name FROM folders"`; do done
URL: http://www.linux.com/archive/feature/151688