LDAP and ODBC same time

Hi all,

I am new to ejabberd. I am evaluating it for one of my projects. I have a question regarding the configuration.

I can successfully make it work with Windows 2003 AD. Now I want to have message log and offline message storing in MSSQL. Is it possible to make such configuration at the same time:

1. LDAP auth with windows 2003
2. ODBC connection of MSSQL

My testing configuration would be:

{hosts, ["abc.com"]}.
{ldap_servers, ["server.abc.com"]}.   
{ldap_uids, [{"mail", "%u@abc.com"}]}.
{ldap_base, "CN=Users,dc=abc,dc=com"}.
{ldap_rootdn, "CN=LDAPUSER,CN=Users,dc=xxxxx,dc=com"}.
{ldap_password, "xxxxxxxxx"}.
{ldap_uidattr, "sAMAccountName"}.
{ldap_filter, "(mail=*)"}.

{host_config, "abc.com", [{auth_method, [odbc]}]}.
{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.

{modules,
[
...
  {mod_offline_odbc,  []},
...
  {ldap_vcard_map,
[{"NICKNAME", "%u", ["nickname"]},
{"GIVEN", "%s", ["givenname"]},
{"FAMILY", "%s", ["sn"]},
{"FN", "%s, %s", ["sn", "givenName"]},
{"EMAIL", "%s", ["mail"]}
...

The Miranda IM client cannot login after I made the ODBC change. Can someone confirm me that my approach is correct?

Regards,
Johnson

Example config

I don't know if the configuration I propose will work, but I hope it does :)

If you want LDAP authentication, and storage of offline messages in ODBC, try:

{hosts, ["abc.com"]}.

%% Definition of LDAP server
{ldap_servers, ["server.abc.com"]}.    
{ldap_uids, [{"mail", "%u@abc.com"}]}. 
{ldap_base, "CN=Users,dc=abc,dc=com"}. 
{ldap_rootdn, "CN=LDAPUSER,CN=Users,dc=xxxxx,dc=com"}. 
{ldap_password, "xxxxxxxxx"}. 
{ldap_uidattr, "sAMAccountName"}.
{ldap_filter, "(mail=*)"}.

%% Definition of ODBC server
{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.

%% Use LDAP authentication
{host_config, "abc.com", [{auth_method, [ldap]}]}.

{modules,
 [
  ...
  {mod_offline_odbc,  []}, %% Use ODBC storage for offline messages
  ...
 ]
}.
Syndicate content