Hi there, > We should add another flag of some sort to vget_assign which is 0 by > default, but in programs like qmailadmin can be set to 1, to make it > return the domain the user logged in with, and not the "real" domain. > This would then no break anything, and only qmailadmin would he to be > rewritten.
This is an interesting idea. For now, as I don't use the SQL functionality, this simple patch seems to work: --- vpopmail-5.2.2.original/vpopmail.c 2003-12-03 03:36:57.000000000 +0100 +++ vpopmail-5.2.2/vpopmail.c 2003-12-03 02:56:24.000000000 +0100 @@ -1933,7 +1933,7 @@ i = fread(tmpbuf,sizeof(char),dlen,fs); /* get the domain line */ - strcpy(domain, tmpbuf); + /* strcpy(domain, tmpbuf); */ /* get the uid */ ptr = tmpbuf; Again, I don't have a complete overview if this may break other things. It will break SQL support for alias domains, thanks Michael for your insightful comment. Anyway, it did quite some tests this night and found no problems. After recompiling qmailadmin to link against the patched vpopmail lib, qmailadmin works as expected, showing the domain name the user used while logging in instead of the "real" domain. Jonas