Sieve LOGIN authentication doesn't work #2911

Closed
rcubetrac opened this Issue Jun 25, 2010 · 15 comments

Projects

None yet

1 participant

@rcubetrac
Collaborator

Reported by agueijo on 25 Jun 2010 15:11 UTC as Trac ticket #1486816

(Sorry for my English I'm from Argentina)

I have problem with plugin managesieve 0.4-beta and cyrus "IMPLEMENTATION"
"Cyrus timsieved v2.2.13-Debian-2.2.13-14+lenny3" but with the same cyrus version and managesieve (Stable: 0.3.1) work fine.

When click in filter it take 1 minute and print in error log:

12:02:34 Failed to read from socket ():
12:02:34 -0300: PHP Error: Unable to connect to managesieve on imap.mpba.gov.ar:2000 in /var/www/test-mail.mpba.gov.ar/trunk/roundcubemail/plugins/managesieve/managesieve.php on line 130 (GET /?_task=settings&_action=plugin.managesieve)
12:02:34 Not currently in AUTHORISATION state (1):

But in my sieve logs I see quickly login ok:

cyrus/sieve[login: shemp.mpba.gov.ar200.0.236.19 aeijo LOGIN User logged in

Thank you

Agustn EIJO

Keywords: managesieve cyrus
Migrated-From: http://trac.roundcube.net/ticket/1486816

@rcubetrac
Collaborator

Comment by @alecpl on 25 Jun 2010 17:29 UTC

Try with svn trunk version. You could also use included PEAR::Net_Sieve package from 0.3.1.

@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 12:08 UTC

I was using the svn trunk version and no work. I put wrong in the form, I fixed it.

Now, I copy the ./plugins/managesieve/lib/Net/Sieve.php from de version 0.3.1 Stable and work perfectly.

@rcubetrac
Collaborator

Comment by @alecpl on 28 Jun 2010 12:23 UTC

So, we know it's Net_Sieve issue. Could you please enable managesieve_debug and attach the log here?

@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 12:25 UTC

Yes, but with Net_Sieve from 0.3.1 or svn trunk ?

@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 12:41 UTC

Well, I attach two debug file, to compare.

(I change the line in session login)

@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 13:54 UTC

Hi,

In function _cmdAuthenticate on line 598 of Sieve.php

Send a empty command,

if I comment this:

_ if (PEAR::isError($res = $this->_doCmd())) { _ return $res; // }

All work perfectly! (I will keep looking in _doCmd)

Agustn EIJO

@rcubetrac
Collaborator

Comment by @alecpl on 28 Jun 2010 16:29 UTC

How about using 2nd argument (true) of _doCmd() in _authLogin()?

@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 17:46 UTC

I try this

if (PEAR::isError($res = $this->_doCmd('',true)))

but dont work

I understand that this is not sent to be null, and block in recvLN because there is no data to read from the server and timeout occurs

I saw that you opened the bug in PEAR
Thanks,
Agustn.

@rcubetrac
Collaborator

Comment by @alecpl on 28 Jun 2010 17:51 UTC

No, I was talking about this line:

if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"'))) {

and maybe this too:

return $this->_doCmd('"' . base64_encode($pass) . '"');
@rcubetrac
Collaborator

Comment by agueijo on 28 Jun 2010 18:05 UTC

Yes, only put in the second line:

        if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"'))) {
            return $result;
        }
        return $this->_doCmd('"' . base64_encode($pass) . '"',true);

Work fine.

@rcubetrac
Collaborator

Comment by @alecpl on 30 Jun 2010 13:16 UTC

I've tested with dovecot and it needs both true's. Please, test this.

@@ -635,10 +635,10 @@
         if (PEAR::isError($result = $this->_sendCmd('AUTHENTICATE "LOGIN"'))) {
             return $result;
         }
-        if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"'))) {
+        if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"', true))) {
             return $result;
         }
-        return $this->_doCmd('"' . base64_encode($pass) . '"');
+        return $this->_doCmd('"' . base64_encode($pass) . '"', true);
     }

     /**
@rcubetrac
Collaborator

Comment by agueijo on 30 Jun 2010 13:26 UTC

Yes, in cyrus too works fine with argument true in the two calls to _doCmd

@rcubetrac
Collaborator

Comment by @alecpl on 1 Jul 2010 10:19 UTC

Fixed in Net_Sieve-1.3.0. Fixed in r3801/svn.

@rcubetrac
Collaborator

Status changed by @alecpl on 1 Jul 2010 10:19 UTC

new => closed

@rcubetrac
Collaborator

Summary changed by @alecpl on 1 Jul 2010 10:19 UTC

managesieve and cyrus

Sieve LOGIN authentication doesn't work

@rcubetrac rcubetrac closed this Jul 1, 2010
@rcubetrac rcubetrac added this to the 0.4-stable milestone Mar 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment