X-Junk-Score: 0 [] X-Cloudmark-Score: 0 [] Return-Path: Received: from [204.94.49.235] (HELO ssaihq.com) by mail.stalker.com (CommuniGate Pro SMTP 5.3.9) with ESMTP id 61814639 for CGatePro@mail.stalker.com; Thu, 02 Sep 2010 07:37:08 -0700 Received-SPF: pass receiver=mail.stalker.com; client-ip=204.94.49.235; envelope-from=james_roman@ssaihq.com X-Scanned-By: MPP/SURBL http://www.messagepartners.com X-Scanned-By: MPP/Clamd http://www.messagepartners.com X-Spam-Rules: ALL_TRUSTED,BAYES_00,HTML_MESSAGE X-Scanned-By: MPP/Spamassassin http://www.messagepartners.com X-ExtScanner: Niversoft's FindAttachments (free) Received: from [10.90.1.13] (account james.roman@ssaihq.com HELO ssai-s01023.ssai-2.com) by ssaihq.com (CommuniGate Pro SMTP 5.3.8) with ESMTPSA id 10118619 for CGatePro@mail.stalker.com; Thu, 02 Sep 2010 10:36:38 -0400 Message-ID: <4C7FB676.9030307@ssaihq.com> Date: Thu, 02 Sep 2010 10:36:38 -0400 From: James Roman User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Communigate Pro Mailing List Subject: Re: Importing records into the Directory References: <4C7EC7DE.7030007@sohnen-moe.com> In-Reply-To: <4C7EC7DE.7030007@sohnen-moe.com> Content-Type: multipart/alternative; boundary="------------020108000208010706030608" This is a multi-part message in MIME format. --------------020108000208010706030608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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----- --------------020108000208010706030608 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-----

--------------020108000208010706030608--