Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Imapsync migrationg to Zimbra fails

  1. #1
    lchrist is offline Intermediate Member
    Join Date
    Dec 2006
    Posts
    24
    Rep Power
    8

    Default Imapsync migrationg to Zimbra fails

    Hi all,

    I've just installed Zimbra and it seems to work just fine. But my problem i migrating 20 users existing IMAP accounts to zimbra.

    For some reason imapsync fails misereably on me when i try to use it.

    With a --justconnect i get the following !

    Here is a darwin system (Darwin Laura.local 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386)
    with perl 5.8.8
    From software : * OK imapfront ready. + stunnel
    From capability : IMAP4rev1 STARTTLS
    To software : * OK laura.local Zimbra IMAP4rev1 service ready
    To capability : IMAP4rev1 LOGINDISABLED STARTTLS BINARY CATENATE CHILDREN ID LITERAL+ LOGIN-REFERRALS NAMESPACE QUOTA SASL-IR UIDPLUS UNSELECT

    Which looks ok. But when i try to run imapsync with --authmech1 LOGIN and --noauthmd5 it fails at login with:

    Read: * OK imapfront ready. + stunnel

    Connect: Received this from readline: 0/OUTPUT/* OK imapfront ready. + stunnel

    Banner : * OK imapfront ready. + stunnel
    Sending literal string in two parts: 1 Login "the_user" {8}

    then: password

    Sending: 1 Login "XXXXXXXX" {8}

    Sent 19 bytes
    Read: 1 NO LOGIN failed

    Error login : [www.webserver.com] with user [the_user] : Error sending '1 Login "the_user" {8}
    password
    ' to IMAP: Bad file descriptor at /opt/local/bin/imapsync line 628, <> line 1.

    Strangely enough. When i try to issue the login command manually "1 login "the_user" password" then i successfully logs in ?

    Do anyone have any ideas or an alternate way of migrating mailboxes ?

    Thanks in advance,

    Lasse K. Christiansen,

  2. #2
    kirme3 is offline Trained Alumni
    Join Date
    Apr 2006
    Location
    Illinois
    Posts
    194
    Rep Power
    9

    Default

    what's your entire imapsync command you are using?

  3. #3
    lchrist is offline Intermediate Member
    Join Date
    Dec 2006
    Posts
    24
    Rep Power
    8

    Default This is what i use

    imapsync --nosyncacls --subscribe --syncinternaldates --noauthmd5 --drop --debugimap --authmech1 LOGIN --host1 www.webserver.com --user1 new_user --password1 password --host2 other-server.com user2 new_user --password2 password

    Have tried with and without SSL which gives me the same error and also tried with and without --noauthmd5. Same error.

    It looks like to me (with my limited Mail-IMAPClient / imapsync) knowledge that Mail-IMAPClient delivers the "1 login "new_user" password" as two seperate entries. While my imap frontend (Linux SME E-smith 6.0 server) wants it on a single line ? Or maybe not :-)

    Any help is greatly appreciated !

    Lasse,

  4. #4
    inigoml's Avatar
    inigoml is offline Project Contributor
    Join Date
    Aug 2006
    Location
    Madrid, Spain
    Posts
    124
    Rep Power
    8

    Default

    Quote Originally Posted by lchrist View Post

    Have tried with and without SSL which gives me the same error and also tried with and without --noauthmd5. Same error.
    Have you tried with PLAIN TEXT password enabled (at Zimbra admin interface) You have also to restart tomcat after setting it.

  5. #5
    lchrist is offline Intermediate Member
    Join Date
    Dec 2006
    Posts
    24
    Rep Power
    8

    Default It's not the Zimbra side which is the problem (yet)

    The problem does not lie with the zimbra side yet. I'm trying to get my exsting imap accounts migrated TO Zimbra.

    The problem is with the existing server which is an SME E-Smith 6.0.

    Regards,

    Lasse,

  6. #6
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default Does --ssl1 work?

    Your existing IMAP server seems to be refusing plaintext LOGIN without advertising LOGINDISABLED in the CAPABILITY string. I don't think imapsync can manage an inline STARTTLS command, so your best bet is to run it with the --ssl1 option to connect to the IMAPs port (993) instead.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    lchrist is offline Intermediate Member
    Join Date
    Dec 2006
    Posts
    24
    Rep Power
    8

    Default Tried it, same result ... damn ..

    Just tried it with both PLAIN and LOGIN as authentication. And both with and without --ssl1 as an option

    This is the results that i'm getting !

    From connection
    Read: * OK imapfront ready. + stunnel

    Connect: Received this from readline: 0/OUTPUT/* OK imapfront ready. + stunnel

    Banner : * OK imapfront ready. + stunnel
    Sending literal string in two parts: 1 Login "new_user" {8}

    then: password

    Sending: 1 Login "XXXXXXXX" {8}

    Sent 19 bytes
    Read: 1 NO LOGIN failed

    Error login : [www.webserver.com] with user [new_user] : Error sending '1 Login "new_user" {8}
    rockaby1
    ' to IMAP: Bad file descriptor at /opt/local/bin/imapsync line 628, <> line 1.


    Same result both with and without SSL1 enabled ?

    if i do it manually then this is the result !

    laura:~ root# telnet www.webserver.com 143
    Trying 7.7.7.7...
    Connected to www.webserver.com.
    Escape character is '^]'.
    * OK imapfront ready. + stunnel
    1 login "new_user" password
    1 OK Logged in.


    It seems as though imapsync breaks the initial login into two parts ? and if i do it manually on a "single line" i seems to be able to login just fine ?

    Any pointers ?


    Lasse,

  8. #8
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default Should have read more closely...

    Yeah, you're exactly right. Apologies for not reading your initial posting more closely.

    There are 2 possibilities I can see here.

    One is that you're giving the wrong user password to imapsync and hence the login's failing. This what I hope is happening, because it's easy to work around.

    The other is that your existing IMAP server is broken in a way that's unfortunately incompatible with the Mail:IMAPClient.pm module used by imapsync. The module's LOGIN command always uses IMAP literal syntax for passwords, which is completely legal under RFC 3501. But your IMAP server can't deal with this and barfs on the LOGIN. (This is why just typing the password in by hand is working -- you're using atom syntax instead of literal syntax.)
    Code:
    	my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
    			"{" . length($self->Password) . 
    			"}\r\n".$self->Password."\r\n";
    I'm not sure how best to work around this second option. It might work to edit Mail:IMAPClient.pm to read
    Code:
    	my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
    			qq("$self->Password") . "\r\n";
    Bugzilla - Wiki - Downloads - Before posting... Search!

  9. #9
    lchrist is offline Intermediate Member
    Join Date
    Dec 2006
    Posts
    24
    Rep Power
    8

    Default This probably brought it a lot closer

    I thought it was related to the literal method used by Mail::IMAPClient as well.

    Unfortunately the passwords used are the right ones.

    Tried your mod of the Mail::IMAPClient.pm but it seems at though the syntax is somewhat wrong (i'm by definition no Perl guru ... not even close). The output that i'm getting from imapsync is now

    From connection
    Banner : No banner
    Sending: 1 Login "XXXXXXXX" ".Mail::IMAPClient=HASH(0x1925330)->Password."

    Sent 62 bytes
    Read: * OK imapfront ready.

    Read: 1 NO LOGIN failed

    Error login : [www.webserver.com] with user [new_user] : 1 NO LOGIN failed



    And then the same error.

    Tailing the log file on the server seem to give me not additional info

    @400000004594423508bf8a44 tcpserver: ok 9640 pc-00183.structuring.dk:10.45.6.183:993 :10.45.6.182::58742
    @400000004594423508d86974 2006.12.28 22:16:11 LOG5[9640:1024]: Using 'imaps' as tcpwrapper service name
    @400000004594423508f505ac 2006.12.28 22:16:11 LOG5[9640:1024]: stunnel 3.22 on i386-redhat-linux-gnu PTHREAD+LIBWRAP with OpenSSL 0.9.6b [engine] 9 Jul 2001
    @400000004594423508f6ab8c 2006.12.28 22:16:11 LOG5[9640:1024]: imaps connected from 10.45.6.182:58742
    @4000000045944235090647a4 imapfront-auth[9641]: * OK imapfront ready.
    @400000004594423509bb2c3c imapfront-auth[9641]: 1 NO LOGIN failed
    @400000004594423509c559b4 2006.12.28 22:16:11 LOG5[9640:1024]: Connection closed: 42 bytes sent to SSL, 62 bytes sent to socket


    But obviously i'm now not sending the right login info !

    Any additional pointers are extremely welcome (and appreciated) :-)

    Lasse,

  10. #10
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default My perl is paged out

    Would this work instead? (My perl has decayed to almost nothing at this point.)
    Code:
    	my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
    			'"' . $self->Password . '"\r\n';
    It will bomb for passwords containing double-quote chars, but that's what you get from a non-perl hacker.
    Last edited by dkarp; 12-28-2006 at 03:46 PM.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 02-27-2007, 04:10 AM
  2. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  3. zimbra-core missing
    By kinaole in forum Developers
    Replies: 1
    Last Post: 10-02-2006, 11:59 AM
  4. port 7071 not listening OS X install
    By leeimber in forum Installation
    Replies: 7
    Last Post: 03-21-2006, 10:47 AM
  5. Zimbra Processor Output
    By UltraFlux in forum Installation
    Replies: 3
    Last Post: 02-01-2006, 08:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •