Skip to content

Instantly share code, notes, and snippets.

@richardsonlima
Last active November 9, 2016 14:33
Show Gist options
  • Save richardsonlima/b873779d4ba3d4b97a818da68faab934 to your computer and use it in GitHub Desktop.
Save richardsonlima/b873779d4ba3d4b97a818da68faab934 to your computer and use it in GitHub Desktop.
for user in $(cat ./accounts.txt);do echo -e '\033[0;36m [+] Efetuando migração do usuario: \033[m' $user && imapsync --timeout 0 --addheader --syncinternaldates --buffersize 81920000 --host1 IP-SERVER-ORIGEM --user1 $user+DovecotSuperUser --password1 'PASSWORD' --authmech1 PLAIN --sep1 "/" --prefix1 "" --syncinternaldates --host2 localhost --port2 7143 --user2 $user@DOMAIN --password2 'PASSWORD' --authmech2 PLAIN --subscribed \
--folder "^INBOX$" \
--folder "FOLDERNAME-1" \
--folder "FOLDERNAME-2" \
--allowsizemismatch --useheader Message-ID ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment