Opened 3 years ago
Closed 3 years ago
#1486816 closed Bugs (fixed)
Sieve LOGIN authentication doesn't work
| Reported by: | agueijo | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.4-stable |
| Component: | Plugins | Version: | git-master |
| Severity: | normal | Keywords: | managesieve cyrus |
| Cc: |
Description
(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:
[25-jun-2010 12:02:34] Failed to read from socket ():
[25-Jun-2010 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)
[25-jun-2010 12:02:34] Not currently in AUTHORISATION state (1):
But in my sieve logs I see quickly login ok:
cyrus/sieve[32654]: login: shemp.mpba.gov.ar[200.0.236.19] aeijo LOGIN User logged in
Thank you
Agustín EIJO
Attachments (2)
Change History (15)
comment:1 follow-up: ↓ 2 Changed 3 years ago by alec
comment:2 in reply to: ↑ 1 Changed 3 years ago by agueijo
- Version changed from 0.4-beta to svn-trunk
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:3 follow-up: ↓ 4 Changed 3 years ago by alec
So, we know it's Net_Sieve issue. Could you please enable managesieve_debug and attach the log here?
comment:4 in reply to: ↑ 3 Changed 3 years ago by agueijo
Yes, but with Net_Sieve from 0.3.1 or svn trunk ?
Changed 3 years ago by agueijo
Changed 3 years ago by agueijo
comment:5 Changed 3 years ago by agueijo
Well, I attach two debug file, to compare.
(I change the line in session login)
comment:6 Changed 3 years ago by agueijo
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)
Agustín EIJO
comment:7 follow-up: ↓ 8 Changed 3 years ago by alec
How about using 2nd argument (true) of _doCmd() in _authLogin()?
comment:8 in reply to: ↑ 7 Changed 3 years ago by agueijo
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,
Agustín.
comment:9 Changed 3 years ago by alec
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:10 Changed 3 years ago by agueijo
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:11 follow-up: ↓ 12 Changed 3 years ago by alec
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:12 in reply to: ↑ 11 Changed 3 years ago by agueijo
Yes, in cyrus too works fine with argument true in the two calls to _doCmd
comment:13 Changed 3 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from managesieve and cyrus to Sieve LOGIN authentication doesn't work
Fixed in Net_Sieve-1.3.0. Fixed in r3801/svn.

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