Jid and e-mail address

Greetings All.

It’'s great that Wildfire supports LDAP right out of box Yet there is a feature that I miss, and once have developed in my ejabberd installation. I would like my users to have their jids and e-mail addresses be the same.

I’‘ve set my to (mail=@example.com) to get jids like john.doe@example.com instead of jdoe@example.com. OK I can authenticate now
and send messages, fine. But http://localhost:9090/user-summary.jsp is empty and debug.log full of: 2005.12.19 18:24:33 Trying to find a user’'s DN based on their username. mail: john.doe@example.com, Base DN: ou=Empolyees,o=EXAMPLE,c=US…
2005.12.19 18:24:33 Creating a DirContext in LdapManager.getContext()…
2005.12.19 18:24:33 Created hashtable with context values, attempting to create context…
2005.12.19 18:24:33 … context created successfully, returning.
2005.12.19 18:24:33 Starting LDAP search…
2005.12.19 18:24:33 … search finished
2005.12.19 18:24:33 User DN based on username ‘‘john.doe@example.com’’ not found.
2005.12.19 18:24:33 Exception thrown when searching for userDN based on username '‘john.doe@example.com’'
org.jivesoftware.wildfire.user.UserNotFoundException: Username john.doe@example.com not found
at org.jivesoftware.wildfire.ldap.LdapManager.findUserDN(LdapManager.java:465)
at org.jivesoftware.wildfire.ldap.LdapManager.findUserDN(LdapManager.java:400)
at org.jivesoftware.wildfire.ldap.LdapUserProvider.loadUser(LdapUserProvider.java: 69)
at org.jivesoftware.wildfire.user.UserManager.getUser(UserManager.java:157)
at org.jivesoftware.wildfire.user.UserCollection$UserIterator.getNextElement(UserC ollection.java:94)
at org.jivesoftware.wildfire.user.UserCollection$UserIterator.hasNext(UserCollecti on.java:57)
at org.jivesoftware.wildfire.admin.user_002dsummary_jsp._jspService(user_002dsumma ry_jsp.java:224)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:822)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler. java:494)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.ja va:624)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)
at org.mortbay.http.HttpServer.service(HttpServer.java:896)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) I suppose it might happen because of inconsitensy between getUsers and findUserDN. The first one returns the value of *() (i mean something like field=uid, *(field)=jdoe). The other though tries to substitute with it thingie in the . So we get mail=john.doe@example.com@example.com which is quite absurd.

What is in fact my problem that I have no field in my directory which contins the users’’ names I would like to becom part of their jids.

I can suggest two sollutions:

  1. A tweak to strip (eg. with a regexp) a part of username in the findUserDN() (input) or getUsers() (output) functions.

  2. A major overhaul. Accept the value of uid filed (jdoe) and return proper jid when ing.

The former seems more user-friendly as you can tell users: “Here you have to put your e-mail address”, when they have their im clients configured. The latter, however, seems to be a bit more consistent from the administrational point of view. It could be also user-friendly if clients required username/realm/resource parts in separate fields telling explicitly that the final effect could be quite different. But thats a whole different story.

In fact it’'s not a “question” but i forgot to untick the box.