"Tyler J. Frederick" wrote:
> 
> Well.. yea, they use the unix passwd file so yea, the usernames are unique
> for each user, but they have the /etc/virtusertable with entries in it
> like this:
> 
> [EMAIL PROTECTED]        localuser
> [EMAIL PROTECTED]       localuser2
> 
> Knowing this, what would I do?  I think I'd do something in ~alias, but
> I'm not necessarily sure.  I could setup vpopmail and in each domain dir
> make the appropriate .qmail file to send to a local user.. However, I
> don't want to have system accounts for each user.  Perhaps vpopmail with
> mysql support would be best?  Just throwing ideas out...  Any thoughts?

The vpopmail authentication structure contains the same fields as the
/etc/passwd data structure with the addition of a domain name.

The default vpopmail sql table definition also includes the domain name.
You can add an additional field which contains the virtualtable
mappings.
This can be done by editing vmysql.h and modifying the table definition.
The table gets created automatically on the first use of the vpopmail
api library calls.

You could then modify the vdelivermail.c (delivers mail to a directory)
and vchkpw.c (authenticates a pop connection and points pop server at
a Maildir).

Both programs could be modified to do an additional sql query to match
the sendmail virtable mappings. 

For example:
vdelivermail: select <password structure> where pw_virt_email = <email
address>
This will deliver to the pw_dir directory.

vchkpw: select <password structure> where pw_virt_user = <localuser>

Then you will need to write a program which parses the virtusertable and
updates the vpopmail sql table for these two new fields. 
    pw_virt_email               pw_virt_user
> [EMAIL PROTECTED]        localuser

That should do it.

Ken Jones
Inter7

> 
> - T
> 
> ---
> Tyler J. Frederick
> Senior Systems Engineer
> fc.com, Inc.
> 
> On 2 Dec 1999, Thomas Neumann wrote:
> 
> > If they use their UNIX username/password right now, this means their
> > usernames are unique over all virtual domains anyway right now, not
> > just unique within each virtual domain, right? Then it should be
> > no problem to set up a one-to-one mapping from unique, unqualified
> > username to the user's virtual maildomain (perhaps using a CDB file
> > that is re-generated once a day for the mapping) and implement
> > a checkpassword for qmail-pop3d that uses this mapping to direct
> > the user to his associated Maildir. Sounds like 30 lines of perl
> > and be done. For mass-converting all currently existing folders
> > to Maildir format I'd suggest a small shell script that uses
> > formail (from procmail) and safecat ( see
> > <URL:http://www.nb.net/~lbudney/linux/software/safecat.html> )
> > The downtime would amount to the time that is needed for folder
> > conversion, during which I would disable SMTP services (or at least
> > not have qmail-send running yet) to avoid a local delivery taking
> > place to a folder that is currently being converted to a Maildir.
> >
> > -t
> >
> >

Reply via email to