Samuel Hill wrote:

When using tmda-cgi .13 and the user logs in to install with just the
username the [ HOSTNAME = "%(Domain)s"
FULLNAME = "%(User)[EMAIL PROTECTED](Domain)s" ] the domain portion is set as the
machines hostname. If the same user uses there full email address as a
log in then it does determine the domain variable correctly.

How should it determine what the Domain is if the user does not provide one?


(I don't know a lot about how Virtual Domains are accomplished, so please excuse my obvious questions!)

In version .12 tmda-cgi was able to correctly determine the users domain
name no matter what.
Did something change in .13 that it determines when no domain is present
upon log in that is uses the machine name?

Probably. There were a *LOT* of changes from 0.12 to 0.13. Most of them small.


As far as I can see, the Domain is guessed like this:

1 - Default to the machine hostname
2 - Then check if TMDAHOST, QMAILHOST, or MAILHOST are defined in the environment. If so, use the first one you encounter.
3 - Then do a RE search on the user's $HOME environment. Look for:
".*/([^\./]+\.[^/]+)/[^/]+/?$". If there's a match, use the bracketed part as the domain.


Note: This RE in step 3 has changed recently - it used to be ".*/domains?/([^\./]+\.[^/]+)/"

So I guess we can ask you how your users' home directories are arranged. Theoretically if there's a domain name in the path, it should be found and used.

I could just use a java script that when the user logs in and has no @
it adds @domain.com after the log in name but that is really messy.

Yeah, then you're limiting logins to those browsers that use javascript.


--
Jim Ramsay
"Me fail English?  That's unpossible!"

_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to