[imp] re: redirect.php / customized login (was unqualified email addresshandling in HEAD..)

Liam Hoekenga liamr@umich.edu
Mon, 12 Aug 2002 17:25:23 -0400


> If I send a message to 'chuck', I get it delivered to chuck@horde.org, 
> since horde.org is my 'maildomain' setting...

It looks like the problem is with how I'm handling our logins... I modified a
version of redirect.php to handle our IMP logins (because we're using kerberos
ticket files, which are obtained by our own authentication apache module, and
our users don't need to presented w/an IMP login).

Anyways, it seems that it's working well enough to get the server setting, and
some of the other information from the approrpriate entry in config/servers.php,
but it's not retrieving all of the info.  Here's what I changed:

--- redirect.php        Tue Aug  6 15:36:58 2002
+++ UMlogin.php Fri Aug  9 12:49:05 2002
@@ -49,6 +49,22 @@
 }
 
-$imapuser = Horde::getPost('imapuser');
-$pass = Horde::getPost('pass');
+$imapuser = $_SERVER['REMOTE_USER'];
+$pass = $_SERVER['REMOTE_USER'];
+
+switch($_SERVER['SERVER_NAME']) {
+    case 'snre.mail.umich.edu':
+       $imapServer = 'snre';
+       break;
+
+    case 'engin.mail.umich.edu':
+    case 'mail.engin.umich.edu':
+       $imapServer = 'caen';
+       break;
+
+    default:
+       $imapServer = 'umce';
+       break;
+
+    }
 
 /* If we already have a session... */
@@ -73,5 +89,5 @@
 if (!is_null($imapuser) && !is_null($pass)) {
     $frameset = Horde::getFormData('frameset');
-    $sessArray = array('server'     => Horde::getFormData('server'),
+    $sessArray = array('server'     => $imapServer,
                        'realm'      => Horde::getFormData('realm'),
                        'port'       => Horde::getFormData('port'),


will the Horde::getFormData call fetch information from config/servers.php, or
should I be handling this differently?

Is $servers['x']['prefered'] still a comma delimited list?  (I tried changing
the entry such that our development machine was the only one in the prefered
list, but still no go).

Liam