migrating imap using imapsync
Solution 1:
a) For the "Connection refused" issue, change dovecot configuration to allow IMAP on the default port 143.
b) For the "dualvar is only available" issue see: https://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/
From dovecot to dovecot rsync will be faster, by a magnitude of 100.
c) For the modules dependencies read http://imapsync.lamiral.info/INSTALL there are the package names to use with yum.
yum install perl-Mail-IMAPClient # Mail::IMAPClient
yum install "perl(Term::ReadKey)" # Term::ReadKey
yum install "perl(Authen::NTLM)" # Authen::NTLM
yum install perl-Data-Uniqid # Data::Uniqid
yum install perl-File-Copy-Recursive # File::Copy::Recursive
yum install perl-IO-Tee # IO::Tee