[SOLVED] imapsync with IMAP over SSL

Looking to migrate to ZCS? Ask here. Got a great tip or script that helped you migrate? Post it here.
manOfmoods
Posts: 21
Joined: Fri Sep 12, 2014 11:54 pm

[SOLVED] imapsync with IMAP over SSL

Postby manOfmoods » Wed Dec 10, 2008 2:48 am

Hello. I have a problem with imapsync moving mail accounts from squirrelmail to Zimbra.
The task is to move mail from mailserv1.domain.com to mailserv2.domain.com

On the mailserv1 is open only IMAPs. (port 993).

Mailserv2 is a zimra server.
According to this wiki User Migration - Zimbra :: Wiki , i tried this:
# imapsync 

--buffersize 8192000 --nosyncacls --subscribe --syncinternaldates

--host1 mailserv1.domain.com --user1 user1 --password1 password1 --ssl1 --port1 993

--host2 mailserv2.domain.com --user2 user2 --password2 password2 --ssl2 --port2 993

--noauthmd5


The result is: pause for a several minutes and then

Can not open imap connection on [mail.iphil.ru] : Socket closed while reading data from server.



I also tried:
$imapsync --host1 mailserv1.domain.com --ssl1 --host2 mailserv2.domain.com –justconnect


The same result.
What might be the reason?
I tested imapsync without SSL, using 143 port (from one zimbra server to another) – it works good. On the Zimbra sever Clear Text Login is enabled.

Zimbra Proxy is not installed.
Maybe the problem is with auth method? Cause on –port1 993 it hangs. On any other value it prints:
Can not open imap connection on [mailserv1.domain.com] : Unable to connect to mailserv2.domain.com: Connection refused

Any help and advices are welcome. Thanks for your attention.


phoenix
Ambassador
Ambassador
Posts: 26617
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] imapsync with IMAP over SSL

Postby phoenix » Wed Dec 10, 2008 4:34 am

The 'connection refused' in your last error message would indicate that the server isn't listening on that port or that a firewall, something is blocking access to that machine or the server isn't running.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
manOfmoods
Posts: 21
Joined: Fri Sep 12, 2014 11:54 pm

[SOLVED] imapsync with IMAP over SSL

Postby manOfmoods » Wed Dec 10, 2008 5:25 am

Yes, it is. I just wrote it to accentuate that other ports (all exept 993) are closed and imapsync quickly understand it. But when i try to connect to 993 port it hangs. What might be the reason?
The same thing was when i tried to synchronize mail from one zimbra server to another zimbra server using 993 port. It just hangs. Waiting for something.

What might be the reason?
manOfmoods
Posts: 21
Joined: Fri Sep 12, 2014 11:54 pm

[SOLVED] imapsync with IMAP over SSL

Postby manOfmoods » Wed Dec 10, 2008 8:25 am

It is interesting that different versions of imapsync provide different output:
1.219 - Hangs with this output:
$ imapsync --host1 mailserv1.domain.com --port1 993 --host2 mailserv2.domain.com --port2 993 --justconnect --noauthmd5 --ssl1 --ssl2

$RCSfile: imapsync,v $ $Revision: 1.219 $ $Date: 2007/04/04 09:32:20 $

Here is a linux system Linux zim.iphil.ru 2.6.18-92.1.10.el5 #1 SMP Mon Aug 4 14:38:32 EDT 2008 i686)

with perl 5.8.8

Mail::IMAPClient version used here is 2.2.9

Command line used :

/usr/bin/imapsync --host1 mailserv1.domain.com --port1 993 --host2 mailserv2.domain.com --port2 993 --justconnect --noauthmd5 --ssl1 --ssl2

then print

Can not open imap connection on [mail.iphil.ru] : Socket closed while reading data from server.

1.267 Output is:

./imapsync --host1 mailserv1.domain.com --port1 993 --host2 mailserv2.domain.com --port2 993 --justconnect --noauthmd5 --ssl1 --ssl2

$RCSfile: imapsync,v $ $Revision: 1.267 $ $Date: 2008/10/07 11:36:02 $

Here is a [linux] system (Linux zim.iphil.ru 2.6.18-92.1.10.el5 #1 SMP Mon Aug 4 14:38:32 EDT 2008 i686)

with perl 5.8.8

Mail::IMAPClient 2.2.9

IO::Socket 1.29

IO::Socket::SSL

Digest::MD5 2.33

Digest::HMAC_MD5

Term::ReadKey

Date::Manip

and the module Mail::IMAPClient version used here is 2.2.9

Command line used :

./imapsync --host1 mailserv1.domain.com --port1 993 --host2 mailserv2.domain.com --port2 993 --justconnect --noauthmd5 --ssl1 --ssl2

Can not open imap connection on [mailserv1.domain.com] :


1) What version of imapsync is recommended?
2) According to the imapsync v 1.267 output there is some problem with firewall or etc, but it doesn't seem to be true. Because thunderbird manage to connect to the mailserv1.domain.com and get mail.

3) Maybe something is wrong with IO::Socket::SSL?
manOfmoods
Posts: 21
Joined: Fri Sep 12, 2014 11:54 pm

[SOLVED] imapsync with IMAP over SSL

Postby manOfmoods » Wed Dec 10, 2008 10:05 am

The problem seems to be solved :)

It was the 3 variant. To be more exactly there was problem with Perl libraries.

I installed or reinstalled them and their dependences and imapsync started to work.
jura
Posts: 10
Joined: Sat Sep 13, 2014 12:00 am

[SOLVED] imapsync with IMAP over SSL

Postby jura » Thu Jan 15, 2009 6:14 am

Hello!
I seem to have the same problem as you did, same errors yet removing the perl packeges and reinstalling them did not help, the imapclient I am using is 2.29 and the imapsync is 1.219. can you tell me the version of perl packages i need to use to sucseed in migration of client...BTW the OS is Debian 4.0 etch...Thanks in advance...
manOfmoods
Posts: 21
Joined: Fri Sep 12, 2014 11:54 pm

[SOLVED] imapsync with IMAP over SSL

Postby manOfmoods » Thu Jan 15, 2009 7:55 am

Hello.
I installed this list of libraries:
Mail-IMAPClient-2.2.9,

Net-SSLeay-1.3.5,

IO-Socket-SSL-1.18,

Date-Manip-5.5.4,

Term::ReadKey-2.30,

Parse-RecDescent-1.96.0,

Net-IDN-Encode-0.99,

Unicode-Stringprep-1.00_20080919,

Digest-MD5-2.38
After that IMAPSYNC 1.267. Hope, it'll help you :)
jura
Posts: 10
Joined: Sat Sep 13, 2014 12:00 am

[SOLVED] imapsync with IMAP over SSL

Postby jura » Fri Jan 16, 2009 5:56 am

it worked !!!!!!!!!!!!!!!!!!!
thanks a lot...
mlanner
Advanced member
Advanced member
Posts: 111
Joined: Fri Sep 12, 2014 11:13 pm

[SOLVED] imapsync with IMAP over SSL

Postby mlanner » Sat Jan 17, 2009 8:17 pm

I'm having issues with building IMAPSYNC and all the dependencies on an Ubuntu 6.06 server. I've used the build script here:
User Migration - Zimbra :: Wiki
... and have adapted it to use the latest version of each of these packages, like:
Mail-IMAPClient-2.2.9,

Net-SSLeay-1.3.5,

IO-Socket-SSL-1.18,

Date-Manip-5.5.4,

Term::ReadKey-2.30,

Parse-RecDescent-1.96.0,

Net-IDN-Encode-0.99,

Unicode-Stringprep-1.00_20080919,

Digest-MD5-2.38
However, when I try to install Parse-RecDescent-1.96.0 it gives me a "Warning: prerequisite version 0 not found."
Any help would be greatly appreciated. Thanks in advance.
mlanner
Advanced member
Advanced member
Posts: 111
Joined: Fri Sep 12, 2014 11:13 pm

[SOLVED] imapsync with IMAP over SSL

Postby mlanner » Sun Jan 18, 2009 2:16 pm

Using Ubuntu 6.06 never really got me anywhere. Updating packages, installing, reinstalling, reconfiguring ... nothing made it work. The Parse-RecDescent package kept giving me difficulties. I finally gave up ...
Instead I built a new machine on Ubuntu 8.04 and installed imapsync via apt-get and added package libdate-manip-perl. I know have a working imapsync on a new, dedicated imapsync machine.
One thing I discovered in the process was that using the FQDN of my Zimbra server, --host2, doesn't work for some reason, despite it being properly configured in DNS. However, using it's IP address works fine.

Return to “Migration”

Who is online

Users browsing this forum: No registered users and 3 guests