Created
November 22, 2017 12:55
-
-
Save javierav/f083c1f1698444ec5a0ca4f44abc72a9 to your computer and use it in GitHub Desktop.
IMAP email migrating with Docker and ImapSync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
EMAIL="john.doe@example.org" | |
FROM_PASSWD="foobarfoo" | |
TO_PASSWD="foobarbaz" | |
DOCKER_IMAGE_NAME="${EMAIL/@/-}" | |
DOCKER_CONTAINER=$(docker run -d --name "$DOCKER_IMAGE_NAME" gilleslamiral/imapsync imapsync \ | |
--host1 X.X.X.X --user1 "$EMAIL" --password1 "$FROM_PASSWD" \ | |
--host2 X.X.X.X --user2 "$EMAIL" --password2 "$TO_PASSWD") | |
exec docker logs -f $DOCKER_CONTAINER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment