[imp] imap server depending on user

Scott Courtney courtney at 4th.com
Wed Sep 3 06:32:14 PDT 2003


On Wednesday 03 September 2003 06:46, Francesco Gringoli wrote:
> could it be possible  to have server settings depending on the username
> that logs in? (server address, port an folder and so on)
> I do not mean a user which choose the server on the login screen.
> Suppose, instead, that users cannot choose the server at all...
> They do not know anything about the server but some
> users are on a server, others on another server, some users
> rely on a Cyrus imap server,

Look into an open source program called "Perdition" (search on Freshmeat.net).
Perdition is an IMAP4 and POP3 proxy. You load it onto a machine that is the
externally-visible IMAP and POP server for your users, and which has an
appropriate generic hostname (imap4.example.com and pop3.example.com, for
instance).

Behind the generic server sits your private network, with an arbitrary number
of IMAP and POP servers on it. They need not be of the same type, nor even
running on the same operating system, so long as they use the standard
well-known ports.

Next, you have an OpenLDAP directory with an entry for each user. These
entries have the "mailhost" attribute set to the fully-qualified hostname
of the user's actual email server.

Properly configured, Perdition accepts the IMAP4 or POP3 connection from
the user, then asks for their authentication credentials. It uses the
login name to look up the mailhost attribute from LDAP. Then Perdition
makes a connection to the *real* server on behalf of the user, presents
the credentials to that server, and establishes a simple port forwarding
proxy connection. From that point on, the user is interacting with their
physical mail server via a transparent proxy on the Perdition server.

I have deployed this setup into an ISP's email environment, and have found
Perdition to work very well.

Scott

-- 
-----------------------+------------------------------------------------------
Scott Courtney         | "I don't mind Microsoft making money. I mind them
courtney at 4th.com       | having a bad operating system."    -- Linus Torvalds
http://4th.com/        | ("The Rebel Code," NY Times, 21 February 1999)
                       | PGP Public Key at http://4th.com/keys/courtney.pubkey



More information about the imp mailing list