6.0.0-beta1
7/26/25

[#3854] IMP connecting to a Courier IMAP Proxy
Summary IMP connecting to a Courier IMAP Proxy
Queue IMP
Queue Version 4.1.1
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester jkk (at) existence (dot) org
Created 04/28/2006 (7029 days ago)
Due
Updated 04/28/2006 (7029 days ago)
Assigned
Resolved 04/28/2006 (7029 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/28/2006 08:07:28 PM Michael Slusarz Comment #2
State ⇒ Duplicate
Reply to this comment
Duplicate of Bug 3793.
04/28/2006 07:04:39 PM jkk (at) existence (dot) org Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ IMP connecting to a Courier IMAP Proxy
Queue ⇒ IMP
Reply to this comment
If IMP is pointed against a IMAP proxy server, it will fail a user 
authentication with "Bad Request" if the user actually gets proxied to 
a different IMAP server.  If the user is local to that IMAP server, 
IMP performs fine.



When Courier IMAP proxy connects to a remote IMAP server, it repeats 
the capability statement - IMP doesn't know how to handle this.  I 
have patched IMAP/Client.php with the following:



--- /usr/src/imp-h3-4.1.1/lib/IMAP/Client.php   2006-03-30 
10:15:31.000000000 +0000

+++ /var/www/html/horde/imp/lib/IMAP/Client.php 2006-04-28 
18:43:17.000000000 +0000

@@ -606,6 +606,18 @@

              case 'NO':

                  return PEAR::raiseError(sprintf(_("Bad login name or 
password."), $message), 'horde.error');



+            // If we connect to a Courier IMAP proxy, it will spit out the

+           // capability line from the server that it automatically 
re-connects+            // you to.  Eat the next line, and proceed 
from there

+            case 'CAPABILITY':

+                $read = $this->_fgets();

+               $results = explode(' ', $read, 3);

+               $response = $results[1];

+               if( $response != 'OK' ) {

+                       return PEAR::raiseError(sprintf(_("Bad login 
name or password."), $message), 'horde.error');

+               } else {

+                       return true;

+               }

              case 'BAD':

              default:

                  return PEAR::raiseError(sprintf(_("Bad request: 
%s"), $message), 'horde.error');




Saved Queries