Cloning a gmail account with impasync

Following on from my post about using imapsync for mass email migration to google apps here is a one-liner to clone one gmail account to another using imapsync:

imapsync --usecache --tmpdir /var/tmp \
--host1 imap.gmail.com --port1 993 \
--user1 user1@gmail.com --password1 **** --ssl1 \
--host2 imap.gmail.com --port2 993 \
--user2 user2@gmail.com --password2 **** --ssl2 \
--exclude 'All Mail|Important'

If you have problems remove or tweak the –usecache and –tmpdir arguments. Remember this will only clone the mail, it won’t move over you other google content such as calendars, contacts, drive, etc.

Please support the author of imapsync (Gilles Lamiral) if you find his software useful.