Format LDIF file for Address Book import

Apr 18, '03 09:49:00AM

Contributed by: davidfmartin

I couldn't locate any information on Apple or elsewhere on what the proper format for the LDIF file Address Book was expecting, so I thought I would post what worked for me:

  dn: cn=David Martin,mail=davidfmartin@yahoo.com
  objectClass: top
  objectClass: person
  objectClass: organizationalPerson
  objectClass: inetOrgPerson
  givenName: David
  sn: Martin
  cn: David Martin
  mail: davidfmartin@yahoo.com
  TelephoneNumber: 303-555-1212
  FacsimileTelephoneNumber: 303-555-1313
  Pager: 303-555-1414
  Mobile: 303-555-1515
  homePostalAddress: 17/275-09
  ou: 3100
  O: You company name here
  description: Mailstop - 12275, any addl. comments.
Once I knew the format, it was then a simple task to create a template I could use in a Perl program that would convert a proprietary contact database to LDIF, and then import that into Address Book.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030417181715719