imapsync_example_darwin.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. # $Id: imapsync_example_darwin.sh,v 1.1 2019/11/06 09:58:57 gilles Exp gilles $
  3. # imapsync example shell for Mac OS users
  4. # lines beginning with # are just comments
  5. # See http://imapsync.lamiral.info/#doc
  6. # for more details on how to use imapsync.
  7. # Replace below the 6 parameters
  8. # "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2"
  9. # with your own values
  10. # Double quotes are necessary if a value contain one or more blanks.
  11. # value for --host1 is the IMAP source server hostname or IP address
  12. # value for --user1 is the IMAP source user login
  13. # value for --password1 is the IMAP source user password
  14. # value for --host2 is the IMAP destination server hostname or IP address
  15. # value for --user2 is the IMAP destination user login
  16. # value for --password2 is the IMAP destination user password
  17. # Character \ at the end of the first line is essential and means
  18. # "this command continues on the next line". You can add other lines
  19. # but don't forget \ character lasting each line, except the last one.
  20. # Three other options are in this example because they are good to start with
  21. #
  22. # --dry makes imapsync doing nothing, just print what would be done without --dry.
  23. #
  24. # --justfolders does only things about folders (ignore messages). It is good
  25. # to verify the folder mapping is good for you.
  26. #
  27. # --automap guesses folders mapping, for folders like
  28. # "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
  29. #
  30. # I suggest to start with --automap --justfolders --dry.
  31. # If the folder mapping is not good then add some --f1f2 fold1=fold2
  32. # to fix it.
  33. # Then remove --dry and have a run to create folders on host2.
  34. # If everything goes well so far then remove --justfolders to
  35. # start syncing messages.
  36. ./imapsync_bin_Darwin --host1 test1.lamiral.info --user1 test1 --password1 'secret1' \
  37. --host2 test2.lamiral.info --user2 test2 --password2 'secret2' \
  38. --automap --justfolders --dry "$@"