You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

  1. #!/bin/bash
  2. echo "Saisir le fichier de comptes :"
  3. read input
  4. echo "Saisir le Host1 :"
  5. read host1
  6. echo "Saisir le Port1 :"
  7. read port1
  8. echo "Saisir le Host2 :"
  9. read host2
  10. echo "Saisir le port2 :"
  11. read Port2
  12. echo "Info host 1 : ${host1} ${port1}"
  13. echo "Info host 2 : ${host2} ${port2}"
  14. option1="--syncinternaldates"
  15. option2="--buffersize 65535000"
  16. option3="--nofoldersizes"
  17. option4="--nofoldersizesatend"
  18. option5="--addheader"
  19. OLDIFS=$IFS
  20. IFS=' '
  21. while read -r account_host1 password_host1 account_host2 password_host2
  22. do
  23. var_acc_host1=$(echo $account_host1)
  24. var_pass_host1=$(echo $password_host1)
  25. var_acc_host2=$(echo $account_host2)
  26. var_pass_host2=$(echo $password_host2)
  27. echo "migration du compte : ${var_acc_host2}"
  28. docker run --rm gilleslamiral/imapsync imapsync --host1 ${host1} --user1 ${var_acc_host1} --password1 ${var_pass_host1} --port1 ${port1} --notls1 --host2 ${host2} --user2 ${var_acc_host2} --password2 ${var_pass_host2} ${option1} ${option2} --port2=993 --ssl2 ${option3} ${option4} ${option5}
  29. done < $input
  30. IFS=$OLDIFS