Handling Custom Attributes in Notes



By: pnuffer

August 30, 2006 6:44 am

Reads: 131

Comments:0

Rating:0

Problem

The documentation for Notes 2.2 driver is not clear on some of the custom attributes. What are the functional differences between the following attributes and when should one be chosen over the other?

Both mailserver and mail-server are used to set the destination mail server for new Notes users when sending an <add> operation (command) to the NotesDriverShim. Both accomplish the same thing (functionally equivalent), but each is used at a different location of an XDS input document. Which is used is determined by the preference of the policy programmer?

Solution

The documentation is confusing (and incorrect) regarding the mailserver parameter. The MailServer parameter is used within an <add-attr> element of an <add> operation. For example:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="MailServer">
      <value type="string">CN=DominoMailServer1/O=Novell</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>

The same objective of setting the mail server on a newly created Notes user can also be accomplished using the mail-server custom parameter by inserting the custom parameter within the <add> element’s attribute list, like the following:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       mail-server="CN=DomainoMailServer1/O=Novell"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>

Given appropriate Notes driver settings and policies, the above sample <input> documents accomplish the same result.

mailfile-rep-new-server and rep-new-server both are custom parameters used to specify the Domino server on which a database is to be replicated. Which database? If using the mailfile-rep-new-server parameter, then the database to be replicated will be the newly created mailfile database of the newly created user. This mailfile-rep-new-server custom parameter is only
effective within an <add> operation. If you’re using the rep-new-server parameter, then the database to be replicated will be the driver’s synchronized database (such as names.nsf).
Both of these parameters can be specified as attributes of the <add>
operation.

For example:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       mail-server="CN=DomainoMailServer1/O=Novell"
       mailfile-rep-new-server="CN=DomainoMailServer2/O=Novell"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       rep-new-server="CN=DomainoDirectoryServer2/O=Novell"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: ,
Categories: Uncategorized

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Comment