[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Is the Mozilla LDIF export bogus?



I wanted to set up a simple LDAP server and thought that the Mozilla's LDAP capabilities would be a good place to begin. However, I notice that their LDIF entries lack any "dc" attribute. For example,

I use a simple script to import Mozilla's LDIF export into OpenLDAP. abzillaPerson.schema is attached.


#!/bin/sh
#
# wandelt Mozillas LDIF fuer OpenLDAPs ldapadd
# ./moz2ldif.sh < adrbook.ldif > mozab.ldif
#
# $Log: moz2ldif.sh,v $
# Revision 1.3  2004/06/26 09:21:23  be
# change mozillaSecondEmail to xmozillaSecondEmail
# change postalAddress to streetAddress
#

DN="dc=berdmann,dc=de"

grep -v ^modifytimestamp | \
sed -e "s/mozillaAbPersonObsolete/abzillaPerson/" | \
sed -e "s/^\(dn:.*\)\(,mail=.*\)/\1/g" | \
sed -e "s/^\(dn:.*\)/\1,$DN/g" | \
sed -e "s/^mozillaSecondEmail: \(.*\)/xmozillaSecondEmail: \1/" | \
sed -e "s/^postalAddress: \(.*\)/streetAddress: \1/" | \
awk "BEGIN { FS = \":\" } { print; }"
# LDAP v3 schema for Mozilla LDAP addressbook.
#
# Bernhard Erdmann <be@berdmann.de>
#
# $Log: abzillaperson.schema,v $
# Revision 1.5  2004/06/26 09:17:25  be
# changed attributetypes to the names Mozilla searches for
# added attributetype homeUrl
#
# Revision 1.4  2004/06/23 23:50:24  be
# AUXILIARY instead of STRUCTURAL for objectclass abzillaPerson
#
# Revision 1.3  2004/06/23 23:28:11  be
# change to my OID 20792
# back to SUP top
#
# Revision 1.2  2004/06/20 17:06:22  be
# modified for Mozilla 1.4
#
# 2002/01/08 maintained by Petr@Kristof.CZ
# All bugfixes, improvements, suggestions
# are welcome.
#
# 1.3.6.1.4.1.20792.666.1.x - attributetypes
# 1.3.6.1.4.1.20792.666.3.x - objectclasses

attributetype (1.3.6.1.4.1.20792.666.1.100 NAME 'xmozillaNickname'
	DESC 'Abzilla Nickname'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

attributetype (1.3.6.1.4.1.20792.666.1.101 NAME 'xmozillaSecondEmail'
	DESC 'Abzilla Second Email Address'
	EQUALITY caseIgnoreIA5Match
	SUBSTR caseIgnoreIA5SubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )

attributetype (1.3.6.1.4.1.20792.666.1.102 NAME 'xmozillaPreferredMailFormat'
	DESC 'Abzilla Preferred Format Of Email'
	EQUALITY caseIgnoreIA5Match
	SUBSTR caseIgnoreIA5SubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{40}
	SINGLE-VALUE )

attributetype (1.3.6.1.4.1.20792.666.1.103 NAME 'mozillaHomePostalAddress2'
	DESC 'Abzilla Home Address'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )

attributetype (1.3.6.1.4.1.20792.666.1.104 NAME 'mozillaHomeLocalityName'
	DESC 'Abzilla Home City'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (1.3.6.1.4.1.20792.666.1.105 NAME 'mozillaHomeState'
	DESC 'Abzilla Home State'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )
	
attributetype (1.3.6.1.4.1.20792.666.1.106 NAME 'mozillaHomePostalCode'
	DESC 'Abzilla Home ZIP Code'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} )

attributetype (1.3.6.1.4.1.20792.666.1.107 NAME 'mozillaHomeCountryName'
	DESC 'Abzilla Home Country'
	SUP NAME
	SINGLE-VALUE )

attributetype (1.3.6.1.4.1.20792.666.1.108 NAME 'mozillaHomeUrl'
	DESC 'Abzilla Home URL'
	EQUALITY caseIgnoreIA5Match
	SUBSTR caseIgnoreIA5SubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )

attributetype (1.3.6.1.4.1.20792.666.1.109 NAME 'workUrl'
	DESC 'Abzilla Work URL'
	EQUALITY caseIgnoreIA5Match
	SUBSTR caseIgnoreIA5SubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )

attributetype (1.3.6.1.4.1.20792.666.1.110 NAME 'birthYear'
	DESC 'Abzilla Birth Year'
        EQUALITY numericStringMatch
        SUBSTR numericStringSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{4} )

attributetype (1.3.6.1.4.1.20792.666.1.111 NAME 'custom1'
	DESC 'Abzilla Custom 1'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (1.3.6.1.4.1.20792.666.1.112 NAME 'custom2'
	DESC 'Abzilla Custom 2'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (1.3.6.1.4.1.20792.666.1.113 NAME 'custom3'
	DESC 'Abzilla Custom 3'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (1.3.6.1.4.1.20792.666.1.114 NAME 'custom4'
	DESC 'Abzilla Custom 4'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )

attributetype (1.3.6.1.4.1.20792.666.1.115 NAME 'homeUrl'
	DESC 'Abzilla Home URL'
	EQUALITY caseIgnoreIA5Match
	SUBSTR caseIgnoreIA5SubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )

objectclass (1.3.6.1.4.1.20792.666.3.100 NAME 'abzillaPerson'
	DESC 'Mozilla Addressbook personal data'
	SUP top
	AUXILIARY
	MAY (	givenName $ sn $ cn $ mail $ telephoneNumber $
		homePhone $ facsimileTelephoneNumber $ pager $
		mobile $ street $ l $ st $ postalCode $ c $
		title $ ou $ o $ description $
		xmozillaNickname $ xmozillaSecondEmail $
		xmozillaPreferredMailFormat $
		mozillaHomePostalAddress2 $
		mozillaHomeLocalityName $ mozillaHomeState $
		mozillaHomePostalCode $ mozillaHomeCountryName $
		mozillaHomeUrl $ workUrl $ homeUrl $ birthYear $
		custom1 $ custom2 $ custom3 $ custom4 ) )