Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Migration

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-2008, 12:48 AM
Intermediate Member
 
Posts: 22
Default [SOLVED] imapsync with IMAP over SSL

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:

Code:
# 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
Code:
Can not open imap connection on [mail.iphil.ru] : Socket closed while reading data from server.
I also tried:

Code:
$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:

Code:
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.

Last edited by manOfmoods; 12-10-2008 at 01:38 AM..
Reply With Quote
  #2 (permalink)  
Old 12-10-2008, 02:34 AM
Zimbra Consultant & Moderator
 
Posts: 20,317
Default

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
Reply With Quote
  #3 (permalink)  
Old 12-10-2008, 03:25 AM
Intermediate Member
 
Posts: 22
Default

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?
Reply With Quote
  #4 (permalink)  
Old 12-10-2008, 06:25 AM
Intermediate Member
 
Posts: 22
Default

It is interesting that different versions of imapsync provide different output:

1.219 - Hangs with this output:

Code:
$ 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
<Hangs> then print
Code:
Can not open imap connection on [mail.iphil.ru] : Socket closed while reading data from server.
1.267 Output is:
Code:
./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?
Reply With Quote
  #5 (permalink)  
Old 12-10-2008, 08:05 AM
Intermediate Member
 
Posts: 22
Smile Solved

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.
Reply With Quote
  #6 (permalink)  
Old 01-15-2009, 04:14 AM
Member
 
Posts: 10
Default

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...
Reply With Quote
  #7 (permalink)  
Old 01-15-2009, 05:55 AM
Intermediate Member
 
Posts: 22
Default

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

Last edited by manOfmoods; 01-15-2009 at 06:29 AM..
Reply With Quote
  #8 (permalink)  
Old 01-16-2009, 03:56 AM
Member
 
Posts: 10
Default migration

it worked !!!!!!!!!!!!!!!!!!!

thanks a lot...
Reply With Quote
  #9 (permalink)  
Old 01-17-2009, 06:17 PM
Special Member
 
Posts: 114
Default

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.
Reply With Quote
  #10 (permalink)  
Old 01-18-2009, 12:16 PM
Special Member
 
Posts: 114
Default Kinda solved ...

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.