Use larch to migrate the data stored in a user’s IMAP account.

To install it on Debian/Ubuntu:

# apt-get install larch

When executing larch, it will prompt the source and destination email and passwords


Copy INBOX folders from to

# larch --from imap:// --to imap://

Copy all folder from to excluding the folders Spam and Trash

# larch --from imap:// --to imap:// --all --exclude Spam Trash

Copy all folders from to using SSL

# larch --from imaps:// --to imaps:// --all