i have 2 centos vps, dovecot, sendmail and ssl are installed on both servers, i want to migrate the mail server from oldserver to newserver so i installed imapsync on both servers. I followed this tutorial, I use the ip address of my servers, instead of the hostname.

When i do:

imapsync --oldserverip --user1 Me@example.com --passfile1 /etc/secret2 --newserverip --user2 me@example.com --passfile2 /etc/secret2

I get:

Temp directory is /tmp PID file is /tmp/imapsync.pid Modules version
list: Mail::IMAPClient     3.32 IO::Socket           1.29
IO::Socket::INET     1.29 IO::Socket::SSL      ? Digest::MD5         
2.36 Digest::HMAC_MD5     1.01 Term::ReadKey        2.30 Authen::NTLM         1.09

Info: turned ON syncinternaldates, will set the internal dates
(arrival dates) on host2 same as host1. Info: will try to use LOGIN
authentication on host1 Info: will try to use LOGIN authentication on
host2 Host1: imap server [old server ip] port [143] user
[me@example.com] Host2: imap server [new server ip] port [143] user
[me@example.com] Failure: can not open imap connection on
[old server ip] with user [me@example.com]: IO::Socket::INET:
connect: Connection refused

If i use ssl1 option and specify which port i want to use i get this error:

dualvar is only available with the XS version of Scalar::Util at /usr/lib/perl5/site_perl/5.8.8/IO/Socket/SSL.pm line 38 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/IO/Socket/SSL.pm line 38. Compilation failed in require at /usr/bin/imapsync line 3900.

I think there are missing dependencies as mentioned here

  • Mail-IMAPClient
  • Net-SSLeay
  • IO-Socket-SSL
  • Date-Manip
  • Term::ReadKey
  • Parse-RecDescent
  • Net-IDN-Encode
  • Unicode-Stringprep
  • Digest-MD5

But i don't know how to install them, they are not available using yum

  • Check if 143 is the right port. Eg. if you use TLS/SSL, you should use port number 993: --ssl1 / --tls1 and --port1 993
    – stderr
    Mar 13 '13 at 22:00
  • @stderr please read my edit
    – Lynob
    Mar 13 '13 at 23:13

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
  • how to migrate email users and mails using rsync?
    – Lynob
    Mar 14 '13 at 0:31

For the missing dependencies, you will need to use a 3rd party repositories such as repoforge or epel.

  • epel is installed and i can't find the requirements using epel
    – Lynob
    Mar 14 '13 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.