Email IMAP tool for syncing, copying, migrating and archiving email mailboxes between servers
10K+
Usage: docker run --rm -it jauderho/imapsync:latest
Up to date multi-platform images are rebuilt at least once a week.
This image differs from the official image in the following ways:
The examples below show how to migrate from Gmail to Apple Mail.
#
# Create a .env in the same directory with the following information before running docker compose
#
# IMAPSYNC_USER1=
# IMAPSYNC_PASSWORD1=
# IMAPSYNC_USER2=
# IMAPSYNC_PASSWORD2=
#
services:
imapsync:
#build: .
container_name: imapsync
image: jauderho/imapsync:latest
command: ["--errorsmax", "200",
"--gmail1",
"--user1", "${IMAPSYNC_USER1}",
"--password1", "${IMAPSYNC_PASSWORD1}",
"--compress1",
"--ssl1",
"--sslargs1", "SSL_verify_mode=1",
"--host2", "imap.mail.me.com",
"--user2", "${IMAPSYNC_USER2}",
"--password2", "${IMAPSYNC_PASSWORD2}",
"--compress2",
"--ssl2",
"--sslargs2", "SSL_verify_mode=1",
"--maxbytespersecond", "200_000",
"--maxbytesafter", "3_000_000_000",
"--addheader", "--useheader", 'Message-Id',
"--no-modulesversion",
"--nochecknoabletosearch",
"--nofoldersizes",
"--nofoldersizesatend",
"--skipcrossduplicates",
"--syncinternaldates",
"--folderlast", '[Gmail]/All Mail',
"--f1f2", '[Gmail]/All Mail=Archive']
Store environment variables in .env:
IMAPSYNC_USER1=
IMAPSYNC_PASSWORD1=
IMAPSYNC_USER2=
IMAPSYNC_PASSWORD2=
This can be rerun repeatedly until all messages are fully copied over to the destination.
docker run --rm -it jauderho/imapsync:latest \
--errorsmax 200 \
--gmail1 \
--user1 <[email protected]> \
--compress1 \
--ssl1 --sslargs1 SSL_verify_mode=1 \
--host2 imap.mail.me.com \
--user2 <[email protected]> \
--compress2 \
--ssl2 --sslargs2 SSL_verify_mode=1 \
--maxbytespersecond 200_000 \
--maxbytesafter 3_000_000_000 \
--addheader --useheader 'Message-Id' \
--no-modulesversion \
--nochecknoabletosearch \
--nofoldersizes \
--nofoldersizesatend \
--skipcrossduplicates \
--syncinternaldates \
--folderlast '[Gmail]/All Mail' \
--f1f2 '[Gmail]/All Mail=Archive'
WARNING: This will delete all emails from the source system as part of the final run.
docker run --rm -it jauderho/imapsync:latest \
--errorsmax 200 \
--gmail1 \
--user1 <[email protected]> \
--compress1 \
--ssl1 --sslargs1 SSL_verify_mode=1 \
--host2 imap.mail.me.com \
--user2 <[email protected]> \
--compress2 \
--ssl2 --sslargs2 SSL_verify_mode=1 \
--maxbytespersecond 200_000 \
--maxbytesafter 3_000_000_000 \
--addheader --useheader 'Message-Id' \
--no-modulesversion \
--nochecknoabletosearch \
--nofoldersizes \
--nofoldersizesatend \
--skipcrossduplicates \
--syncinternaldates \
--folderlast '[Gmail]/All Mail' \
--f1f2 '[Gmail]/All Mail=Archive'
Content type
Image
Digest
sha256:6afdd7208…
Size
70 MB
Last updated
2 days ago
docker pull jauderho/imapsync