Subject: Virtual Domain Patch

From: Raul Dias <[email-masked]>
Date: Mon, 16 Jul 2001 17:02:09 -0300

Hi I have worked over vpop patch from David Harris<[email-masked]> and 
update it to the latest stable imap (imap-2000c) with lots of updates.
If anyone needs the patch for the latest devel version (snapshot) let me know as I will 
do it.

As lots of people have asked (in imap list too) about virtual domain support I am posting it 
here, as it is the correct list for it (AFAIK).

This patch adds the vpop interface to imapd.  To compile it one should :
$ make <system> VPOP=<type>

where <system> is the system being compiled (e.g. Linux with 
PAM support should be lnp)

and <type> is the VPOP interface to use.

This patch contains the extmakemap VPOP interface.
(so to compile it (linux with PAM): $ make lnp VPOP=extmakemap)

This interfaces accepts usernames in the format
user@domain in additional to the regular use.

When the username is specified in the format user@domain,
it will lookup the makemap utility from sendmail to get the 
real account in the system for the email user@domain and use it
as if it was specified by the client.

If not found it will look for a generic domain email (@domain) and 
if found use it.

As a least resource it will strip the @domain and try with 'user' only.

Note that If you aply the patch, but compile imap without the VPOP part, it
will generate exactly the same binary as without the patch
(this would allow easy integration with imap).

VPOP allows two kinds of use:
1-  translate usernames provided by a client to a real system user 
      (as the extmakemap does)
2-  provides an interface to a builtin authentication scheme
3-  Allows multiple virtual email support with only one system account (securily)
      (usually done with 2)

This means that anyone can add its one scheme without even patching imapd (or env_unix.c) 
or undestanding it.

The files vpop.txt explains how to do it and vpop_extmakemap.txt explain the extmakemap interface.

Also note that David Harris <[email-masked]> does not mantain the patch anymore,
but he has a (outdated) site with some helpfull information about it at http://www.davideous.com

I really hope that this helps (or enlights) those looking for a solution like this.

btw, this patch was only tested on Linux,  reports on other systems and patchs are welcomed.

Regards,

Raul Dias
Speedway Internet Service