Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sieve LOGIN authentication doesn't work #2911

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

Sieve LOGIN authentication doesn't work #2911

rcubetrac opened this issue Jun 25, 2010 · 15 comments

Comments

@rcubetrac
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Comment by agueijo on 28 Jun 2010 12:25 UTC

Yes, but with Net_Sieve from 0.3.1 or svn trunk ?

@rcubetrac
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

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

@rcubetrac
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

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

@rcubetrac
Copy link
Author

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

new => closed

@rcubetrac
Copy link
Author

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

managesieve and cyrus

Sieve LOGIN authentication doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant