Last active
February 25, 2020 19:01
-
-
Save te-online/50adc9c86274c96efb03e441cc37c639 to your computer and use it in GitHub Desktop.
Massive Mail Move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Enter FROM hostname: " | |
read HOST1 | |
echo -n "Enter FROM user: " | |
read USER1 | |
echo -n "Enter FROM password: " | |
read -s PASS1 | |
echo -n "Enter TO hostname: " | |
read HOST2 | |
echo -n "Enter TO username: " | |
read USER2 | |
echo -n "Enter TO password: " | |
read -s PASS2 | |
imapsync --host1 ${HOST1} --user1 ${USER1} --password1 ${PASS1} --host2 ${HOST2} --user2 ${USER2} --password2 ${PASS2} --ssl1 --ssl2 --addheader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOST1="host1.example.org" | |
HOST2="host2.example.org" | |
declare -a users=("user1" "user2") | |
declare -a passw=("geheim1" "geheim2") | |
for i in "${!users[@]}" | |
do | |
imapsync --host1 ${HOST1} --user1 "${users[$i]}" --password1 "${passw[$i]}" --host2 ${HOST2} --user2 "${users[$i]}" --password2 "${passw[$i]}" --tls1 --tls2 --addheader | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment