Mailing List CGatePro@mail.stalker.com Message #100597
From: James Roman <james_roman@ssaihq.com>
Subject: Re: Importing records into the Directory
Date: Thu, 02 Sep 2010 10:36:38 -0400
To: Communigate Pro Mailing List <CGatePro@mail.stalker.com>
Sorry original reply went directly to original poster.

On 01/-10/-28163 02:59 PM, James Moe wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
  I am attempting to import some addresses into the Directory. The
source data is an LDIF file.

  The result for this type of entry is:
directory record objectClass is unknown
error in line #10

  Line 10 is a blank line. (Really? Blank lines are not allowed?)

  After removing the objectClass lines:
cannot add a record: objectClass is not specified
error in line #5

  Again, line 5 is a blank line.

  So. CGPro does not import an LDIF file if it does ("unknown"), or does
not ("not specified"), have an objectClass attribute.
  The LDIF file is generated by Mozilla Thunderbird v3.1.

  What's the trick for actually getting this to work?
When doing an ldif import the blank line is the end of record indicator. Otherwise how would it know that those attributes are associated with the initial DN entry? The error indicates that the problem is with the record that precedes the blank line.
- ----[ typical entry ]----
dn: cn=ASSP - Spam Report,mail=assp-spam@sohnen-moe.com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaAbPersonAlpha
cn: ASSP - Spam Report
mail: assp-spam@sohnen-moe.com
modifytimestamp: 1283362810
- ----[ end ]----
\
First off, the dn record needs to be valid for your server's directory structure. You will probably need to replace the dn from
dn: cn=ASSP - Spam Report,mail=assp-spam@sohnen-moe.com
to something more like
dn: cn=ASSP - Spam Report,cn=sohnen-moe.com
or whatever is valid for your directory server. (Use the Directory -> Units -> Directory Unit -> Browse to view the proper format for your mail server users. You should not add the "objectclass: CommuniGateAccount" attribute if these are just global address book entries.)

Unless you actually have added the mozillaAbPersonAlpha objectclass added to your server, this import entry will fail. (Check Directory -> Units -> Directory Unit -> Schema). If it is not listed under the ObjectClasses section, you will need to strip it out and any attributes associated to that objectclass. Reviewing the schema (https://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema), you can delete any attributes that include the text "mozilla" in the attribute name.

The Modifytimestamp attribute is also not standard for the CGP schema.

- -- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx+x94ACgkQzTcr8Prq0ZNvagCfVIlEQhl5N+dtTlc+1mHNI4UC
UZ0AnRJwOh4653lMczEw7TrOwGV4M14H
=M04i
-----END PGP SIGNATURE-----

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster