Skip to content

Instantly share code, notes, and snippets.

@asalant
Created April 28, 2012 15:31
Show Gist options
  • Select an option

  • Save asalant/2519835 to your computer and use it in GitHub Desktop.

Select an option

Save asalant/2519835 to your computer and use it in GitHub Desktop.
imapsync script for copying one one google apps account to another
# See:
# http://www.linux-france.org/prj/imapsync_list/msg00616.html
# http://www.linux-france.org/prj/imapsync_list/msg00639.html
imapsync \
--fast \
[email protected] [email protected] \
--password1 password1 \
[email protected] [email protected] \
--password2 password2 \
--host1 imap.gmail.com \
--host2 imap.gmail.com \
--ssl1 \
--ssl2 \
--authmech1 LOGIN \
--authmech2 LOGIN \
--split1 100 \
--split2 100 \
--exclude 'Spam|Trash' \
--syncinternaldates \
--justfolders \
imapsync \
--fast \
[email protected] [email protected] \
--password1 password1 \
[email protected] [email protected] \
--password2 password2 \
--host1 imap.gmail.com \
--host2 imap.gmail.com \
--ssl1 \
--ssl2 \
--authmech1 LOGIN \
--authmech2 LOGIN \
--useheader 'Message-Id' \
--useheader 'X-Gmail-Received' \
--regexmess 's/Delivered-To: user\@domain1.com/Delivered-To: user\@domain2.com/g' \
--regexmess 's/<user\@domain1.com>/<user\@domain2.com>/g' \
--exclude 'Spam|Trash' \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment