[ejabberd] Cannot publish vCard, both mod_vcard and mod_vcard_ldap

Lionel Dricot zeploum at gmail.com
Mon Aug 11 18:10:44 MSD 2008


Hello,

I've configured an Ejabberd server with some domains using LDAP
authentification and some others using internal Mnesia db. It works great
except for vCard.

Domain1 is using ldap_auth and mod_vcard_ldap, domain2 is using auth
internal and mod_vcard without any option.

All seems to work fine because accounts are working wonderfully well. Users
on domain1 can retrieve their vCard and see the content stored in LDAP
(which is the proof that mod_vcard_ldap is working) but they cannot modify
it.
Users on domain2 can retrieve the default empty vCard but cannot publish any
modificaitons.

In both cases, the server reply :

<error type="cancel" code="503" >

<service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>

</error>

Anyone has an idea on how I can solve this problem ?

Thank in advance,

Lionel


PS : here's the configuration for both domains.


domain 1:

{host_config, "domain1", [{auth_method,ldap},
 {ldap_servers,
 ....
  {{add, modules}, [
  {mod_vcard_ldap,      [
 %% We use the same server and port, but want to bind anonymously because
    %% our LDAP server accepts anonymous requests to
    %% "ou=AddressBook,dc=example,dc=org" subtree.
    {ldap_rootdn, ""},
    {ldap_password, ""},
    %% define the addressbook's base
    {ldap_base, "ou=Users,dc=example,dc=org"},
    %% uidattr: user's part of JID is located in the "mail" attribute
    %% uidattr_format: common format for our emails
    {ldap_uids, [{"mail", "%u at domain1"}]},
    %% We have to define empty filter here, because entries in addressbook
does not
    %% belong to shadowAccount object class
    {ldap_filter, ""},
    %% Now we want to define vCard pattern
    {ldap_vcard_map,
     [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
      {"GIVEN", "%s", ["givenName"]},
      {"FAMILY", "%s", ["sn"]},
      {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
      {"EMAIL", "%s", ["mail"]},
      {"PHOTO", "%s", ["jpegPhoto"]},
      {"BDAY", "%s", ["birthDay"]}]},
    %% Search form
    {ldap_search_fields,
     [{"User", "%u"},
      {"Name", "givenName"},
      {"Family Name", "sn"},
      {"Email", "mail"},
      {"Birthday", "birthDay"}]},
    %% vCard fields to be reported
    %% Note that JID is always returned with search results
    {ldap_search_reported,
     [{"Full Name", "FN"},
      {"Nickname", "NICKNAME"},
      {"Birthday", "BDAY"}]}
     %% end of mod_vcard_ldap
   ]},
]}]}.



domain 2:

{host_config, "domain1", [{auth_method, internal},
{{add, modules}, [
  {mod_vcard, []}
]}
]}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20080811/a7eb98fa/attachment.html>


More information about the ejabberd mailing list