使用imapsync迁移imap

我有两个centos vps,dovecot,sendmail和ssl都安装在两台服务器上,我想将邮件服务器从oldserver迁移到newserver,所以我在两台服务器上都安装了imapsync。 我遵循这个教程 ,我使用我的服务器的IP地址,而不是主机名。

当我做:

 imapsync --oldserverip --user1 [email protected] --passfile1 /etc/secret2 --newserverip --user2 [email protected] --passfile2 /etc/secret2 

我得到:

 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 [[email protected]] Host2: imap server [new server ip] port [143] user [[email protected]] Failure: can not open imap connection on [old server ip] with user [[email protected]]: IO::Socket::INET: connect: Connection refused 

如果我使用ssl1选项,并指定我想要使用哪个端口,我得到这个错误:

dualvar仅适用于/usr/lib/perl5/site_perl/5.8.8/IO/Socket/SSL.pm第38行的Scalar :: Util的XS版本。BEGIN失败 – 编译在/ usr / lib / perl5 / site_perl / 5.8.8 / IO / Socket / SSL.pm第38行。在/ usr / bin / imapsync第3900行的编译失败。

我认为这里提到的缺less依赖关系

  • 邮件IMAPClient
  • 净的SSLeay
  • IO编程SSL
  • date – MANIP
  • 期限:: ReadKey
  • parsing-RecDescent的
  • 净IDN-编码
  • Unicode的STRINGPREP
  • 摘要-MD5

但我不知道如何安装它们,它们不可用于使用yum

a)对于“拒绝连接”问题,更改dovecotconfiguration以允许默认端口143上的IMAP。

b)对于“dualvar是唯一可用的”问题请参阅: https ://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error -in-的centos-5 /

从dovecot到dovecot rsync会更快,达100级。

c)对于模块依赖关系,请阅读http://imapsync.lamiral.info/INSTALL,这里有与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 

对于缺失的依赖关系,您将需要使用第三方存储库,如repoforge或epel 。