Skip to content

Instantly share code, notes, and snippets.

@JCotton1123
Last active March 5, 2023 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JCotton1123/a7975f1d53f785b491c0 to your computer and use it in GitHub Desktop.
Save JCotton1123/a7975f1d53f785b491c0 to your computer and use it in GitHub Desktop.
Sync mail to gmail
#!/usr/local/bin/bash
#Remember to set
#export MAIL_SYNC_SRC=
user1=$1
user2=$2
passwd_file=$3
imapsync --host1 $MAIL_SYNC_SRC --user1 "$user1" --passfile1 "$passwd_file" --ssl1 --port1 993\
--host2 imap.gmail.com --user2 "$user2" --passfile2 "$passwd_file" --ssl2 --port2 993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment