For virtual hosting with ldap, you have to configure a uid attribute. Is it possible to specify an attribute that contains the entire jid instead? I have a server that hosts several email addresses on several domains and it uses ldap for user authentication and mailbox location. I would like to give each email user a jid. Here is a made up example of part of my ldap:
cn:Bob Abc
uid:bob
mail:bob@abc.com
password:secret
cn:Bob Xyz
uid:bobx
mail:bob@xyz.com
password:secret
Is it possible to have those two accounts be seperate and use the value of "mail" as their jid?
I need this as well
I also want to clarify that I'm looking to host each realm locally. That means that the virtual host for xyz.com and abc.com will both be configured. I'm *not* trying to create JIDs like (user@abc.com@xyz.com).
I have so far been unable to find a way to do this with ejabberd but I'm still looking. Any suggestions or pointers are welcome.
/BAK/
bklang@alkaloid.net
http://projects.alkaloid.net
--
Ben Klang
404.475.4850
Here's a patch to do that
I found a way to do what we want, but it required modifying the ejabberd_auth_ldap module. This patch hard-codes the userid part of the DN to be "userid@server" before sending to to LDAP for a match. This code works for me, but of course your mileage may vary.
I'm working on a better version of this that will allow a configuration option in ejabberd.cfg which I'll submit to the ejabberd maintainers.
----------- SNIP
-----------SNIP
This literally appends "@" and the Virtual Host domain to the User ID (node) part of the JID.
/BAK/
bklang@alkaloid.net
http://projects.alkaloid.net
--
Ben Klang
404.475.4850