In article <004601beb137$cd758020$[EMAIL PROTECTED]> you wrote:
> I am sure this has come up before but I have not been able to find
> a complete answer.  I have a list of virtual users and virtual domains
> stored in a mysql database.  I want the users to get their mail via POP (or
> web pages that use POP).  There will be no real accounts on this system.
> I see how I can substitute checkpassword for users getting their mail
> via POP.  How do I get qmail-smtp to deliver the mail to these
> virtual users by looking up account in the database?  Does code
> already exist to do this?

Unfortunately I can't provide you with code to do this - but can assure
you that it is indeed possible.

I have an automatic signup server (using PHP+MySQL) which creates users
accounts.  Dialup auths directly from MySQL via Radiator(RADIUS).
Each "user" gets a full 'virtualdomain' as their username with
[EMAIL PROTECTED] going to their maildir.

I wrote my own checkpasswd which also auths directly and delivery program
which first checks to see if the maildrop exists.  If it doesn't then it
checks the MySql db for the domain to see if it is a valid user, if so
it creates the Maildir in the correct place and delivers the mail.  If it
does already exist it assumes it is ok and delivers without a DB query.

One "gotcha" is that the POP3 checkpasswd, if it auths OK, must create the
Maildir also if it doesn't exist or the user will get unexpected errors.

Good luck with it.

Paul.

-- 
Email pgregg at tibus.net |       CLUB24       | Email pgregg at nyx.net    | 
Technical Director        |      INTERNET      | System Administrator       |
The Internet Business Ltd |    Free  Access    | Nyx Public Access Internet |
http://www.tibus.net      |  www.club24.co.uk  | http://www.nyx.net         |

Reply via email to