imapsync_example.sh 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/sh
  2. # $Id: imapsync_example.sh,v 1.7 2019/11/06 09:58:42 gilles Exp gilles $
  3. # imapsync example shell for Unix 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 --host1 test1.lamiral.info --user1 test1 --password1 'secret1' \
  37. --host2 test2.lamiral.info --user2 test2 --password2 'secret2' \
  38. --automap --justfolders --dry "$@"
  39. # Warning to Mac users using the binary imapsync_bin_Darwin,
  40. # this example is not ready to play.
  41. # You have replace the command above
  42. # ./imapsync
  43. # by
  44. # ./imapsync_bin_Darwin
  45. #
  46. # an easier way is to use the ready to use example script named
  47. # examples/imapsync_example_darwin.sh
  48. #