Importing Thunderbird Addressbooks to OpenLDAP server
Yesterday I tried to import all address book entries from Mozilla Thunderbird
into an OpenLDAP
That was quite a pain, because the TB-exported LDIF-scheme did not import into LDAP, so I had to do quite some
1. Import the mozillaOrgPerson schema
- Import the mozillaOrgPerson_V0.6.2 schema into your ldap-server
- Adjust slapd.conf's sizelimit option if your address book contains more than 500 (= default value) entries
- Run the conversion script to fix all issues regarding TB-Addressbook Export and OpenLDAP LDIF import.
Download the mozillaOrgPerson_V0.6.2 schema
and copy it to "/etc/ldap/schema/".
Add the following include statement anywhere on top of your "/etc/ldap/slapd.conf" file.
After this, restart your slapd.
2. Adjust slapd.conf's sizelimit option
If your address book has more than 500 entries, you need to set the sizelimit option in slapd.conf. By default,
it is not mentioned and so I added a newline at the end of the file containing the following directive:
# Because we have more than 500 entries in our database...
3. Run the conversion script
I wrote a cool perl script to prepare the exported LDIF-file from Thunderbirds addressbook for importing it
into my OpenLDAP server (I used phpldapadmin to import the file).
Check out the syntax highlighted version of the script
for a precise explanation of what it does exactly or alternatively download the script
I was very happy to have a LDIF-source file with soooo many exceptions and unusual statements so I could take care
of all of them.
If you experience any errors or want to provide additional features to this script, please contact me on the usual