[imp] Automatic login IMP form portal

Chuck Hagenbuch chuck@horde.org
Tue, 17 Jul 2001 17:32:29 -0400


Quoting kanareykin@denison.edu:

> What I mean is that I don't want to send the username and password
> to the user's browser and then 'log in' the user with JavaScript
> or something like that, making the browser send imapuser and pass
> to redirect.php (or remote_login). In this case the password shows
> up in the page's source.
> 
> It's the web server that will open the conection to IMP and 
> send username/pass to IMP via POST, sort of mimicking the login 
> form.

I think you're making this more complicated than it needs to be. You should 
just make a modified copy of redirect.php from IMP. In it, take whatever form 
data you have - the uid, the session for your portal, whatever - and use it to 
lookup username/password/server/etc. Then put those values where IMP expects to 
find them - $HTTP_POST_VARS['imapuser'], etc. - and let the rest of the code 
handle it like it normally does. The session will be created for you and you'll 
be redirected to the mailbox index.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
Some fallen angels have their good reasons.