I have a virtual domain setup, but it isn't using vpopmail/whatever - it's basically a custom setup based off some how-to-setup-a-popmail-toaster pages I found on the 'net
My virtual users are stored in e.g.:
/var/qmail/popboxes/wwwdotorg.org/swarren/
I haven't been following this thread this time... When the original RE change was made, I suggested requiring the VLOOKUP script to print the user's domain name, instead of using an RE to determine it from the HOME directory.
Since the virtual user system knows this information, it seems having it tell tmda-cgi what the information is keeps tmda-cgi from having explicit knowledge of virtual user schemes or directory layout.
This seems like an excellent idea for TMDA 0.14!
I don't know if the standard virtual user schemes print this information from their script, but a wrapper around the vpopmail system couldn't be that hard, or perhaps vpopmail is such that when calling the vuserinfo script, you've already parsed the login ID into user/domain portions so you can just return it directly? Certainly, the script I use as a vpopmail1 VLOOKUP script accepts user_id and domain arguments, so the information is already there. For the qmailuserassign, it could be modified to search /var/qmail/control/virtualdomains to convert the name in users/assign to domain name.
Sadly I don't know a lot about how people are implementing virtual users with tmda-cgi... but I think the real problem is how to guess the domain if the user logs in with just a username - no domain given. If we put that logic in a specific virtual-user-implementation stub instead of within tmda-cgi itself, it would make things a lot more maintaintable. I hate long ugly REs.
The best solution may be not touching the existing wrappers that exist, but creating a new programs in the stubs directory:
getdomain-qmailuserassign.py getdomain-vmailmgr1.py getdomain-vpopmail1.py getdomain-xams1.py
Each of which will, for the virtual user organization in question, take a username as the single argument, and return the domain name as the only output.
I suppose one could also modify the programs so that if you pass a '-d username' to it, it does the same thing. I don't really care which it is, but I'll need help to do it, since I don't know beans about virtual users.
-- Jim Ramsay "Me fail English? That's unpossible!"
_____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users