Skip to content

Instantly share code, notes, and snippets.

@julesjanssen
Last active December 4, 2023 18:27
Show Gist options
  • Save julesjanssen/76e579f556bd52fa131f to your computer and use it in GitHub Desktop.
Save julesjanssen/76e579f556bd52fa131f to your computer and use it in GitHub Desktop.
imapsync from Gmail / Google apps to Fastmail
#!/bin/sh
imapsync --host1 imap.gmail.com --user1 email@gmail.com --ssl1 --password1 "xxxx" \
--host2 mail.messagingengine.com --user2 email@fastmail.fm --ssl2 --password2 "xxxx" \
--prefix1 "[Gmail]/" \
--exclude "All Mail" \
--nofoldersizes \
--skipcrossduplicates \
--folderlast "[Gmail]/All Mail" \
--regextrans2 's/\[Gmail\]/Gmail/' \
--regextrans2 's/Sent Mail/Sent Items/' \
--regextrans2 's/(Sent Messages .*)/Sent Items/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment