[Tickets #3854] NEW: IMP connecting to a Courier IMAP Proxy

bugs@bugs.horde.org bugs at bugs.horde.org
Fri Apr 28 12:04:39 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3854
-----------------------------------------------------------------------
 Ticket             | 3854
 Created By         | jkk at existence.org
 Summary            | IMP connecting to a Courier IMAP Proxy
 Queue              | IMP
 Version            | 4.1.1
 State              | Unconfirmed
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


jkk at existence.org (2006-04-28 12:04) wrote:

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






More information about the bugs mailing list