Sieve LOGIN authentication doesn't work #2911

rcubetrac opened this Issue Jun 25, 2010 · 15 comments


None yet

1 participant


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 in /var/www/ 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: aeijo LOGIN User logged in

Thank you

Agustn EIJO

Keywords: managesieve cyrus


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.


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.


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?


Comment by agueijo on 28 Jun 2010 12:25 UTC

Yes, but with Net_Sieve from 0.3.1 or svn trunk ?


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)


Comment by agueijo on 28 Jun 2010 13:54 UTC


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


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

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


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


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) . '"');

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.


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);


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


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

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


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

new => closed


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