Webmail applications that are kind to the IMAP server?

Gary Mills mills at cc.UManitoba.CA
Tue Sep 3 23:05:28 EDT 2002


On Tue, Sep 03, 2002 at 10:00:59AM -0400, Rob Siemborski wrote:
> On Tue, 3 Sep 2002, JP Howard wrote:
> 
> > Actually, a simpler answer is to just create a "socket pool". Simply
> > create a daemon that stores a socket for each user in a
> > hash/dictionary. The daemon listens for a request like "get <username>
> > <password>" and passes the socket from the pool (creating one if
> > necessary by logging in to the IMAP server). Then the web app just uses
> > the socket as per usual, and when done sends an "unlock <username>"
> > back to the daemon.
> 
> I'm not convinced this is good enough, since a user could conceivably have
> two sepperate webmail sessions on the same system (imagine two windows
> open to the same webserver, browsing different mailboxes).  Now which
> session knows the state of the IMAP connection?
> 
> You need something to juggle the possibility that there are multiple
> concurrent web accesses for a given userid, and just storing a single
> socket in the selected state isn't good enough.

Yes, you really need to introduce the concept of a `session' with
the user's browser.  This implies that the e-mail web application
would present a session key along with the user information at the
beginning of each connection to the proxy.  It also implies that
the web application no longer speaks IMAP to the proxy, unless the
session key could be included somehow.  As well, once the web application
knows that it's speaking to a proxy, it can behave differently, not
needing to log in and log out for each connection, and doing other
optimizations.  It's really splitting an IMAP client into two parts,
one that maintains a connection to the IMAP server, and one that
accepts transient connections from the web browser.

-- 
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-




More information about the Info-cyrus mailing list