Realm and change_server: bug or feature?

Fritz Zaucker zaucker@ee.ethz.ch
Tue, 12 Mar 2002 08:48:50 +0100 (MET)


Hi,

when using the following settings:

     $conf['server']['server_list'] = false;
     $conf['server']['change_server'] = true;

in IMP I can specify the mail server at login. If I then connect with

   User:   smith
   Server: imap1.example.org

and another user with the same login name on another server connects with

   User:   smith
   Server: imap2.example.org

as far as Horde is concerned we have the same username (smith) and share
Preferences and Addressbook. Correct?

In IMP 2.x the server name was added to the userid automatically. This is
not the case in IMP 3.0. Is there a reason for this design change? What am I
missing?

I realize that the realm tag in the server list definition was added to deal
with this situation, but that doesn't help if using a change_server setup.

I solved this with the following patch:

--- horde/imp/lib/IMP.php.dist        Sun Nov 18 17:17:24 2001
+++ horde/imp/lib/IMP.php     Mon Mar 11 22:40:28 2002
@@ -163,8 +163,8 @@
             $imp['protocol'] = Horde::getFormData('protocol', '');
             $imp['maildomain'] = Horde::getFormData('maildomain', '');
             $imp['namespace'] = Horde::getFormData('namespace', '');
+ $imp['uniquser'] = $imp['user']  . '@' . $imp['server'];
         }
-
         $imp['mailbox'] = '';
         if (IMP::authenticate(OP_HALFOPEN) === true) {
             if ($registry->getMethod('auth/login') == $registry->getApp()) {

But this might not be the correct/best solution. Perhaps this should
be configurable.

Please let me know what you think.

Best regards,
Fritz

-- 
Dr. Fritz Zaucker, Head IT Support Group
Department of Information Technology and Electrical Engineering
Swiss Federal Institute of Technology
ETZ J97, Gloriastrasse 35, CH-8092 Zurich, Switzerland
Tel.: +41-1-632-5241 Fax: +41-1-632-1194 http://people.ee.ethz.ch/~zaucker/
E-mail: zaucker@ee.ethz.ch (see home page for PGP key)