You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the script it works fine for some users but for others there seems that imapsync can´t recognize the prefix and separator:
Host1 separator and prefix: [.][INBOX.]
Host2 separator and prefix: [/][Other Users/]
Obviously "Other Users separator "doesn´t exist on the target server so imapsync tries to create them.
I tried to alter the script with --sep2 / --prefix 2 "". This gives me so far the correct prefix and separator but imapsync still tries to create the INBOX Trash Spam etc even though this folders exists on the target server.
Hi,
I don´t know if this is a imapsync issue or just my script but I´ll try to explain it.
I have following script:
!/bin/bash
inputfile="migrate_accounts.txt"
host1="10.10.10.1"
host2="localhost"
logfile="/var/log/imapsyncbatch.log"
if [ ! -f $inputfile ]
then
{
echo "The input file does not exist! Exiting..." >> $logfile
exit;
}
fi
date=
date +%X_-_%x
echo "$date IMAPSync started..." >> $logfile
tr ";" " " <$inputfile | while read u1 p1 u2 p2
do
date=
date +%X_-_%x
echo "$date Start Syncing User $u1 to $u2" >> $logfile
imapsync --dry $1 --exclude Spamfilter.* --buffersize 8192000 --nosyncacls --syncinternaldates
--host1 $host1 --user1 "$u1" --password1 "$p1" --ssl1 --port1 993
--host2 $host2 --user2 "$u2" --password2 "$p2" --ssl2 --port2 993
date=
date +%X_-_%x
echo "$date Finished $u1 to $u2" >> $logfile
done
date=
date +%X_-_%x
echo "$date IMAPSync Finished..." >> $logfile
echo "$date ------------------------------------" >> $logfile
The migrate_accounts.txt file looks like this:
some.user@example1.com;mypass1;some.user@example1.com;mypass1;
some.user@example2.com;mypass2;some.user@example2.com;mypass2;
When I run the script it works fine for some users but for others there seems that imapsync can´t recognize the prefix and separator:
Host1 separator and prefix: [.][INBOX.]
Host2 separator and prefix: [/][Other Users/]
Obviously "Other Users separator "doesn´t exist on the target server so imapsync tries to create them.
I tried to alter the script with --sep2 / --prefix 2 "". This gives me so far the correct prefix and separator but imapsync still tries to create the INBOX Trash Spam etc even though this folders exists on the target server.
And now when i try to run this from the cli
imapsync --dry --exclude Spamfilter.* --buffersize 8192000 --nosyncacls --syncinternaldates
--host1 10.10.10.1 --user1 some.user@example1.com --password1 mypass1 --ssl1 --port1 993
--host2 localhost --user2 usser@example1.com--password2 mypass1 --ssl2 --port2 993 \
it works.
So I dont´t know exactly whats going on. Thank you.
The text was updated successfully, but these errors were encountered: