Do you have the ability to connect using an internal hostname/network instead of a public IP? This should eliminate the internet, firewalls, connectivity issues, etc as a possible root cause. If this continues to fail there you might look into something like IMAPCopy/IMAPSync which allows scripted migration of accounts automatically. I hope that helps!
Kyle Kerst
IT Coordinator
SmarterTools Inc.
www.smartertools.com