imap proxy?

Bryan Allen bda at
Sat Aug 22 16:35:38 MSD 2009

| On 2009-08-22 01:36:06, Brian Henson wrote:
>    I know you can separate it by the letter it starts with. (fastmail  
> does this)  If there was a host header or some variation there of it  
> would be nice.  can i get a definite answer from someone who has used  
> the imap proxy please?  the docs are incomplete on the features. 

The nginx IMAP proxy can speak to a CGI to do IMAP authentication munging.

The CGI does whatever user lookups you need. The auth script then returns to
nginx the username, hostname, port, etc, to nginx which hands that off to the
IMAP server you specify for authentication.

At work we use a Catalyst server for this:

 * Client hits nginx
 * nginx hits
 * uses the passed-in username to look up the user's IMAP/POP
   server:port, and their internal account ID (which is what Cyrus uses for
 * passes the above back to nginx
 * nginx proxies the connection to the user's IMAP/POP server:port, using the
   new acctid at domain credentials

The example on the nginx wiki seems to be pretty clear, using a simple PHP

We've been using this for a bit over two years, without issue. nginx is pretty
great, and the IMAP/POP proxying works very well.
cyberpunk is dead. long live cyberpunk.

More information about the nginx mailing list