Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Write to ldap addressbook - Thunderbird 3.01 Alpha

122 views
Skip to first unread message

pie...@azolia.fr

unread,
Dec 14, 2007, 4:28:48 PM12/14/07
to
Hi,

I've compile thunderbird version 3.0a1pre (2007121419) on linux ubuntu
gutsy, I've added :
#define MOZ_EXPERIMENTAL_WRITEABLE_LDAP true
to file "nsAbLDAPDirectory.cpp, in order to see how things are going
with ldap write.

I've added mozilla ldap schema to run with openldap. I can now edit
address cards but when I click on "save" button it says :
LDAP : adding objectClass top
LDAP : adding objectClass person
LDAP : adding objectClass organizationalperson
LDAP : adding objectClass inetorgperson
LDAP : adding objectClass mozillaabpersonalpha
LDAP : setting attribute sn (LastName) to 'testLastName'
LDAP : setting attribute givenname (FirstName) to 'TestFirstName'
LDAP : setting attribute cn (DisplayName) to 'TestFirstName testLastName'
LDAP modification failed (code: 21, message: objectClass: value #4
invalid per syntax)


Do you have any idea ?

Regards,

Pierre

Mark Banner

unread,
Dec 14, 2007, 6:22:26 PM12/14/07
to
pie...@azolia.fr wrote:
> I've added mozilla ldap schema to run with openldap. I can now edit
> address cards but when I click on "save" button it says :
> LDAP : adding objectClass top
> LDAP : adding objectClass person
> LDAP : adding objectClass organizationalperson
> LDAP : adding objectClass inetorgperson
> LDAP : adding objectClass mozillaabpersonalpha
> LDAP : setting attribute sn (LastName) to 'testLastName'
> LDAP : setting attribute givenname (FirstName) to 'TestFirstName'
> LDAP : setting attribute cn (DisplayName) to 'TestFirstName testLastName'
> LDAP modification failed (code: 21, message: objectClass: value #4
> invalid per syntax)
>
> Do you have any idea ?

Have you added inetorgperson (and possibly organizationalperson) to
openldap as well? sorry I can't remember the default setup at the
moment, but that may be the problem.

Standard8

pie...@azolia.fr

unread,
Dec 15, 2007, 2:08:22 AM12/15/07
to
Hi,

Thanks for your reply.
My slapd.conf start looks like that :
----------------------------------------------------------------------------------------------------------------------
allow bind_v2
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /usr/share/evolution-data-server-1.12/evolutionperson.schema
include /usr/share/doc/samba-doc/examples/LDAP/samba.schema
include /etc/ldap/schema/evoldap.schema
include /etc/ldap/schema/mozilla.schema
-----------------------------------------------------------------------------------------------------------------------

I've taken this schema for "mozilla schema" :
------------------------------------------------------------------------------------------------------------------------
#

# mozillaOrgPerson schema v. 0.6

#


# req. core

# req. cosine

# req. inetorgperson


# attribute defs


attributetype ( 1.3.6.1.4.1.13769.2.1.1

NAME ( 'mozillaNickname' )

SUP name )


attributetype ( 1.3.6.1.4.1.13769.2.1.2

NAME ( 'mozillaUseHtmlMail' )

SYNTAX 1.3.6.1.4.1.1466.115.121.1.7

SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.1.3

NAME 'mozillaSecondEmail'

EQUALITY caseIgnoreIA5Match

SUBSTR caseIgnoreIA5SubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )


attributetype ( 1.3.6.1.4.1.13769.2.1.4

NAME 'mozillaHomeLocalityName'

EQUALITY caseIgnoreMatch

SUBSTR caseIgnoreSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )


attributetype ( 1.3.6.1.4.1.13769.2.1.5

NAME 'mozillaPostalAddress2'

EQUALITY caseIgnoreListMatch

SUBSTR caseIgnoreListSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
attributetype ( 1.3.6.1.4.1.13769.2.1.7

NAME ( 'mozillaHomeState' ) SUP name )


attributetype ( 1.3.6.1.4.1.13769.2.1.8

NAME 'mozillaHomePostalCode'

EQUALITY caseIgnoreMatch

SUBSTR caseIgnoreSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} )


attributetype ( 1.3.6.1.4.1.13769.2.1.9

NAME ( 'mozillaHomeCountryName' )

SUP name SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.1.10

NAME ( 'mozillaHomeFriendlyCountryName' )

EQUALITY caseIgnoreMatch

SUBSTR caseIgnoreSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )


attributetype ( 1.3.6.1.4.1.13769.2.1.11

NAME ( 'mozillaHomeUrl' )

EQUALITY caseIgnoreIA5Match

SUBSTR caseIgnoreIA5SubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )

attributetype ( 1.3.6.1.4.1.13769.2.1.12

NAME ( 'mozillaWorkUrl' )

EQUALITY caseIgnoreIA5Match

SUBSTR caseIgnoreIA5SubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )


# un-comment for all LDAP server NOT supporting SYNTAX
2.16.840.1.113730.3.7.1

attributetype ( 1.3.6.1.4.1.13769.2.1.13

NAME ( 'nsAIMid' )

DESC 'AOL Instant Messenger (AIM) Identity'

EQUALITY telephoneNumberMatch

SUBSTR telephoneNumberSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )


# un-comment for Netscape 6.x and all other LDAP server supporting
SYNTAX 2.16.840.1.113730.3.7.1

# attributeTypes ( 2.16.840.1.113730.3.1.2013

# NAME ( 'nsAIMid' )

# DESC 'AOL Instant Messenger (AIM) Identity'

# SYNTAX 2.16.840.1.113730.3.7.1 )

attributetype ( 1.3.6.1.4.1.13769.2.1.96

NAME ( 'mozillaCustom1' )

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26

SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.1.97

NAME ( 'mozillaCustom2' )

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26

SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.1.98

NAME ( 'mozillaCustom3' )

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26

SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.1.99

NAME ( 'mozillaCustom4' )

SYNTAX 1.3.6.1.4.1.1466.115.121.1.26

SINGLE-VALUE )



# objectClass defs


objectclass ( 1.3.6.1.4.1.13769.2.2.1

NAME 'mozillaOrgPerson'

SUP top

AUXILIARY

MAY ( mozillaNickname $

mozillaUseHtmlMail $

mozillaSecondEmail $

mozillaPostalAddress2 $

mozillaHomePostalAddress2 $

mozillaHomeLocalityName $

mozillaHomeState $

mozillaHomePostalCode $

mozillaHomeCountryName $

mozillaHomeFriendlyCountryName $

mozillaHomeUrl $

mozillaWorkUrl $

mozillaCustom1 $

mozillaCustom2 $

mozillaCustom3 $

mozillaCustom4 $

c $

co ) )
---------------------------------------------------------------------------------------

Strangly, update on existing items works :
---------------------------------------------------------------------------------------


LDAP : adding objectClass top
LDAP : adding objectClass person
LDAP : adding objectClass organizationalperson

LDAP : adding objectClass mozillaabpersonalpha
LDAP : setting attribute mail (PrimaryEmail) to 'pie...@azolia.org'
LDAP : setting attribute sn (LastName) to 'bernardo'
LDAP : setting attribute givenname (FirstName) to 'bernardo'
LDAP : setting attribute cn (DisplayName) to 'bernardo'
------------------------------------------------------------------------------------


To resume, update seems to work but new item creation fails...
Prefs.JS and config editor have been kept default (I haven't changed
anything).

Any ideas ?

Regards,

Pierre


Mark Banner

unread,
Dec 15, 2007, 8:37:08 AM12/15/07
to
pie...@azolia.fr wrote:
> I've taken this schema for "mozilla schema" :

Try the one at
http://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema - its
more up to date than that one that you have.

Mine slapd.conf has just:

include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/mozillaAddressBookEntry.schema

> To resume, update seems to work but new item creation fails...
> Prefs.JS and config editor have been kept default (I haven't changed
> anything).

You may need to tweak something - I'll need to check what it is and try
it. Our set-ups seem similar, so give me a couple of hours and I should
be able to try it again.

Standard8

pie...@azolia.fr

unread,
Dec 15, 2007, 9:46:01 AM12/15/07
to
Hi Mark,

Thanks for your reply, I've changed schema to fit
"http://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema".
First remark : slapd when restarted complained :
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd - failed:
/etc/ldap/schema/mozilla.schema: line 148: AttributeType not found:
"mozillaCustom2"

For the moment I've removed mozillaCustom* attributes (seems not really
important for that test)

I've restarted slapd, and it went FINE.
Then, I create a new card and here is the result :


LDAP : adding objectClass top
LDAP : adding objectClass person
LDAP : adding objectClass organizationalperson
LDAP : adding objectClass inetorgperson
LDAP : adding objectClass mozillaabpersonalpha

LDAP : setting attribute sn (LastName) to 'shcema'
LDAP : setting attribute givenname (FirstName) to 'test'
LDAP : setting attribute cn (DisplayName) to 'test shcema'
LDAP modification succeeded

It worked !! This came only from the schema (which indeed was quite
difficult to find...Official mozilla schema I mean)

Second remark (less technical), I've been looking around for a workable
email client with ldap write support for now 2 months.
Apart from those who claim LDAP is not meant to support contacts but for
large enterprises staff repositories, I think that LDAP is a great
structure and could (within a secure DIT) easily store clients,
suppliers etc... for SME.
So, I've tried :
- Evolution (which is buggy when run on MS windows)
- Thunderbird (which is cool but lacks write support)
- Outlook (which lacks also write functionality)
- funambol only with LDAP connector (well, for mobile devices and/or
calendars : OK, but for connected internal PCs, it seems ....strange)

My personal conclusions are :
- Thunderbird + write LDAP functionalities + some funambol lightning
sync functionalities WOULD be the best solution :
- We could rely on standards to store contacts in a good manner
- Shared contacts (for example : A specific DIT for "Sales people",
another for "IT" etc)
- Calendar with lightning + sync4j for calendar sharing + mobile devices

This would be a really professional alternative to MS exchange and/or
microsoft SBS 2003. Thunderbird would really be competitive.

What do you think Mark ?

For the moment, I'm gonna test those new write functions.

Best regards,

Pierre

0 new messages