I am having mixed results using imapsync to migrate 50 users from Google to Zimbra. Some accounts work beautifully, on others, imapsync can't even log in to Google's imap server even though the credentials are correct and IMAP is enabled on all Google accounts. Imapsync sometimes fails with "parse_headers want an ARRAY ref" which I have googled extensively and not found fixes for.

Is there anyone who has done this migration recently?
What tools are you using?
Do I need to better tune imapsync?
Can Fetchmail be used?


I am using:

CentOs-5
zcs-NETWORK-5.0.4_GA_2101.RHEL5 (large file support per Wiki)
imapsync -v 1.250
perl v5.8.8

imapsync $1 --nosyncacls --syncinternaldates --buffersize 8192000 \
--exclude "Trash" --exclude "Deleted Items" \
--exclude "Deleted Messages" --exclude "Deleted" \
--ssl1 --ssl2 --noauthmd5 --authmech1 LOGIN --authmech2 LOGIN \
--host1 $host1 --user1 "$user" --password1 "$p1" \
--host2 $host2 --user2 "$user2" --password2 "$p2"

Thanks in advance for your time and knowledge,