Export (0) Print
Expand All

Customizing Directory Synchronization

 

Topic Last Modified: 2006-09-14

The Exchange Connector for Lotus Notes provides a component that synchronizes one or more Domino directories with the Active Directory® directory service. Synchronization is bi-directional and can include custom recipients as well as mailboxes. The names and addresses of distribution lists (Notes "groups") can be synchronized; however, the membership of the DL or group is not carried in the shadow entry, and all mail routing must be done on the system where the distribution list or group is maintained.

As delivered, the product synchronizes a useful subset of the many attributes supported by the two directories. This topic explains how attributes are synchronized, and how you can customize the process to meet local requirements. Through customization, you can do either of the following:

  • Change the list of attributes that are synchronized between Domino and Exchange Server 2003, adding or removing attributes.

  • Change the way attributes are mapped between the systems.

The synchronization process uses four control files, which are located in two subdirectories of the Connector's root directory. The UNC for the Notes Connector's root directory is:

   \\<servername>\connect$\exchconn

noteNote:
If you edit these files using Notepad or another text editor, ensure that you save backup copies of the shipped files. In addition, do not use the Tab key when making changes. All whitespace characters should be entered using the space key. Also, before you edit these files, ensure that directory synchronization is not active (for example, by shutting down the Notes Connector). If you add attributes to the synchronized schema or change any mapping rules for existing attributes, you will most likely need to do a full directory reload in one or both directions.

Schema definition files determine the subset of the native directory schemas that are synchronized. Each line in the file that is not blank or a comment defines a single attribute. The first column is a short name or tag for a directory attribute used in the mapping rules (see below). The second column has the maximum field length for the purpose of directory synchronization. The total of all field lengths must not exceed approximately 9500. The third column contains the internal name for the attribute in the directory. The Lotus Domino Directory's schema definition includes a fourth column, which should be present but is not used by the Connector.

Adding and Removing Attributes

To remove an attribute from the AMAP.TBL simply add a semicolon to the beginning of the line to comment it out. For example commenting out the LastName in the Notes AMAP.TBL:

;LASTNAME 64 LastName NULL

noteNote:
  Do not delete attributes from the file. Deleting attributes results in non unique directory entries, which are rejected from the directory.

To add an attribute you must fill in the columns with the appropriate information. For the Exchange AMAP.TBL it is the Friendly Name, Length, Exchange Common Name, and the Key Attribute fields. For the Notes AMAP.TBL it is the Friendly Name, Length, Notes Field Name and Key Attribute fields. However, there are several attributes within the AMAP.TBL files that are commented out. Simply remove the semicolon, and the attributes will be added.

Attributes added to the AMAP.TBL file are read by the connector but are not active until an appropriate mapping rule is created between the two schemas.

Active Directory Schema (defined in Dxamex\amap.tbl):

ACCOUNT 32 Assoc-NT-Account

COMPANY 64 Company

DEPARTMENT 64 Department

FULLNAME 128 Display-Name

FIRSTNAME 64 Given-Name

ALIAS 64 Mail-nickname

OFFICE 64 Physical-Delivery-Office-Name

LASTNAME 64 Surname

NOTESADDR 128 Proxy-Addresses(NOTES:)

USNCreated 12 USN-Created

Initials 5 Initials

Title 32 Title

Phone 20 Telephone-Office1

MobilePhn 20 Telephone-Mobile

Fax 20 Telephone-Fax

Lotus Domino Directory Scheme (defined in Dxanotes\amap.tbl):

FULLNAME 220 FullName 1

MAILDOMAIN 31 MailDomain 2

COMPANY 64 CompanyName NULL

DEPARTMENT64 Department NULL

FIRSTNAME 64 FirstName NULL

LASTNAME 64 LastName NULL

LOCATION 128 Location NULL

SHORTNAME 8 ShortName NULL

Initials 5 MiddleInitial NULL

Title 32 JobTitle NULL

Phone 20 OfficePhoneNumber NULL

MobilePhn 20 CellPhoneNumber NULL

Fax 20 OfficeFAXPhoneNumber NULL

; do not change the following definitions

UNID 64 $$UNID NULL

DN 256 $$DN NULL

USNCreated 16 $$USN NULL

Mapping rule files define how attributes from one schema are mapped to attributes in the other schema. Each non-blank, non-comment line is a rule that assigns a value to a single attribute in an entry in the target directory. The right-hand side of the rule is a string expression made up of string constants, numeric constants, references to attributes in the source directory, and built-in string manipulation functions.

The following rules for mapping Domino attributes to Active Directory attributes are shipped in Dxamex\mapnotes.tbl:

Alias = ISEQUAL( ShortName, "", SUBSTR( FullName, 1, 64 ), ShortName )

FullName = X500( FullName, "CN" )

FirstName = FirstName

LastName = LastName

Company = Company

Department = Department

Office = Location

Initials = Initials

; change the following rule only with care TA = "NOTES:" Strip( FullName, ";", "L", "R" ) "@" MailDomain

; do not change the following rule DN = UNID

Note that the DN and TA attributes were not defined explicitly in the Exchange schema. These attributes are required for directory synchronization and are always synchronized. The TA (Target-Address) attribute is the Notes user's e-mail address and must be unique within the Exchange directory. Although Notes does not enforce the uniqueness of this name, for all practical purposes the name must be unique to allow the Notes router to reliably deliver mail to the right mailbox. The DN (Distinguished Name) mapping rule actually provides only a portion of the eventual full DN created for the Notes entry in Exchange. The full DN is constructed by concatenating the DN of the Import Container where Notes custom recipient entries are stored, with the DN fragment created by the mapping rule.

The TA rule provides a good example of how the string expressions work. For example, if the Notes user's full name and mail domain are "Denise Graham/Sales/Acme Corp; Denise Graham; Graham" and "Acme-HQ", then this rule will result in an Exchange TA field containing "NOTES:Denise Graham/Sales/Acme Corp@Acme-HQ". See below for a full description of the built-in mapping functions that are available.

The following rules for mapping Exchange attributes to Notes attributes are shipped in Dxanotes\mapmex.tbl:

FullName = Trim( Strip( NotesAddr, "@", "R" ), "B" )

MailDomain = Trim( Strip( NotesAddr, "@", "L" ), "B" )

ShortName = Alias

LastName = ISEQUAL( LastName, "", FullName, LastName )

FirstName = FirstName

Company = Company

Department = Department

Location = Office

Initials = Initials

; do not change the following rules UNID = "00000000-00000000-00000000-00000000"

USN = USNCreated

DN = DN

Mapping Rules use a simple macro language that allows you to define how to create entries in different directory systems. An important part of this macro language is the mapping functions that manipulate a series of arguments you supply and return a result in the form of a string. Your mapping rules can combine this result with other constant strings and function calls to build up the overall result of the rule.

Mapping functions operate on strings and numeric constants. Strings can be either attribute tags (the short names defined in the schema definition file) from the source directory, or string literals. A string literal is an actual sequence of characters enclosed in quotation marks, such as "Star Mart", ".", or even " " (three spaces). Note that you cannot use the real internal attribute names in mapping rules. You must use the attribute tags defined in the schema definition files.

FUNCTION_NAME( arguments )

For example:

LEFT (Fullname, 4)

If this function is coded in a mapping rule, it will return the left-most four characters of the contents of the Fullname field in the source directory.

Functions can be combined with each other or with string literals, allowing you to create arbitrarily complex result strings. A rule and the resulting string it returns can be as long as 2,048 characters.

The list below represents all the built-in mapping functions; more complete explanations and examples are provided later in this document.

AND()

Returns the concatenation of two non-null strings, or the null string if either of the two strings specified is null.

CFGPARM()

Returns a value from the connector's INI file.

ISEQUAL()

Returns a configurable value, depending on whether or not two expressions are equal.

LEFT()

Returns the left n characters of an expression, padded on the right if necessary.

LOWER()

Converts a field to lower-case characters.

NAMEF()

Returns a person's first name or initial from a pre-formatted string.

NAMEL()

Returns a person's last name or initial from a pre-formatted string.

NAMEM()

Returns a person's middle name or initial from a pre-formatted string.

POS()

Determines the position of a particular string within an attribute.

PROPER()

Converts a name field to proper-name format.

REPLACE()

Converts a name field to proper-name format.

RIGHT()

Returns the right n characters of an expression, padded on the left if necessary.

SUBSTR()

Returns a specified sub-string of a string, padded with extra characters if necessary.

STRIP()

Locates the left-most or right-most occurrence of one string in another and removes characters.

TRIM()

Returns a field with leading and/or trailing blanks removed.

UPPER()

Converts a field to upper-case characters.

WORD()

Returns a specified number of words from a string.

X500()

Extracts an attribute from an X.500-style hierarchical address.

Mapping Functions: Detailed Descriptions

Notational conventions:

UPPERCASE type

used for function names

[ ]

used to indicate optional arguments. If an optional argument is omitted, its default value is assumed.

In the examples, each sample call is followed by the result it produces. Although the examples use only string literals as arguments, remember that each argument can itself be an arbitrarily complex string expression, including nested function calls.

Syntax:

AND(exp1,exp2)

Description:

Returns the concatenation of two non-null strings, or the null string if either of the strings involved is null.

Examples:

AND("A", "B" ) "AB"

AND ("", "B") ""

AND("A", "") ""

Syntax:

CFGPARM( exp1[,exp2] )

Description:

CFGPARM returns the value of a parameter in the Exchconn.ini file. Exp1 specifies the parameter whose value is to be returned; exp2 specifies the section within the INI file. If the section is omitted, then the DXA's home section is used. If neither the section nor the parameter is found, the result is an empty string.

Examples:

CFGPARM( "executable") "lsdxamex.exe"

CFGPARM( "locale", "dxm") "English"

Syntax:

ISEQUAL( exp1, exp2, val1, val2 )

Description:

ISEQUAL returns the value of val1 if exp1 equals exp2, otherwise it returns the value of val2. ISEQUAL is not case-sensitive.

Examples:

ISEQUAL( "remote", "remote", "R", "L") "R"

ISEQUAL( "remote", "local", "R", "L") "L"

ISEQUAL( "remote", "REMOTE", "R", "L") "R"

Syntax:

LEFT ( field, length, [, pad] )

Description:

LEFT returns the left-most length characters of field. If field has fewer than length characters, the result is padded on the right with the pad character. The default pad character is a blank.

Examples:

LEFT ( "416-555-0123", "3" ) "416"

LEFT ( "triple", "9" ) "triple "

LEFT ( "triple", "9", "x" ) "triplexxx"

Syntax:

LOWER ( field )

Description:

LOWER returns the value of field with any upper-case letters converted to lower-case.

Examples:

LOWER ( "Contoso" ) "contoso"

LOWER ( "Bonnie" ) "bonnie"

Syntax:

NAMEF ( field, [, style] )

Description:

If field contains a person's name in a specified format, NAMEF returns the person's first name or initial. Two styles are supported:

  • The name is in the form "First Middle Last".

  • The name is in the form "Last, First Middle".

The default style is 1 if field does not contain a comma, 2 if it does.

Initials or strings of initials are treated as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style.

Examples:

NAMEF ( "Shirleen H. Travers" ) "Shirleen"

NAMEF ( "S. H. Travers" ) "S."

NAMEF ( "SH Travers" ) "SH"

NAMEF ( "Travers, Shirleen H.", "2" ) "Shirleen"

NAMEF ( "Shirleen", "2" ) "Shirleen"

Syntax:

NAMEL ( field, [, style] )

Description:

If field contains a person's name in a specified format, NAMEL returns the person's last name. Two styles are supported:

  • The name is in the form "First Middle Last".

  • The name is in the form "Last, First Middle".

The default style is 1 if field does not contain a comma, 2 if it does.

Initials or strings of initials are treated as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style.

Examples:

NAMEL ( "Shirleen H. Travers" ) "Travers"

NAMEL ( "S. H. Travers" ) "Travers"

NAMEL ( "Shirleen Travers" ) "Travers"

NAMEL ( "Travers, Shirleen H.", "2" ) "Travers"

NAMEL ( "Shirleen") "Shirleen"

Syntax:

NAMEM ( field, [, style] )

Description:

If field contains a person's name in a specified format, NAMEM returns the person's middle name or initial. Two styles are supported:

  • The name is in the form "First Middle Last".

  • The name is in the form "Last, First Middle".

The default style is 1 if field does not contain a comma, 2 if it does.

Initials or strings of initials are treated as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style. Anything that is not identified as a first or last name is considered a middle name.

Examples:

NAMEM ( "Shirleen H. Travers" ) "H."

NAMEM ( "S. H. Travers" ) "H. "

NAMEM ( "Travers, Shirleen H." ) "H. "

NAMEM ( "Travers, Shirleen", "2" ) ""

NAMEM ( "Travers, Shirleen H.", "2" ) "H."

Syntax:

POS ( field, target )

Description:

POS returns the position of the string target within field. If the target is not in the field, POS returns zero.

Examples:

POS ( "Title: President", "Ti" ) "1"

POS ( "Title: President", ":" ) "6"

POS ( "Title: President", "Manager" ) "0"

Syntax:

PROPER ( field )

Description:

PROPER returns the value of field with lower-case and upper-case letters converted to mixed-case, as if field were a proper name.

Examples:

PROPER ( "contoso" ) "Contoso"

PROPER ( "robert") "Robert"

PROPER ( "o'hara" ) "O'Hara"

Syntax:

REPLACE ( field, what [,with] )

Description:

This mapping function enables you to remove specific characters from an ID or replace selected characters with substitute characters. It scans field for any characters in the what string and replaces them with the corresponding character from the with string. If the with string is shorter or is not provided (meaning that one or more characters in what have no corresponding characters in with), those characters are elided (removed) from field.

Examples:

REPLACE ("James Hendergart"," ","_") "James_Hendergart"

REPLACE ("Sales & Marketing E-mail Group"," ",".") "Sales.&.Marketing.E-mail.Group"

Syntax:

RIGHT ( field, length [,pad] )

Description:

RIGHT returns the right-most length characters of field. If field has fewer than length characters, the result is padded on the left with the pad character. The default pad character is a blank.

Examples:

RIGHT ( "416-555-0123", "7" ) "55-0123"

RIGHT ( "416-555-0123", "8" ) "555-0123"

RIGHT ( "node", "5", "@" ) "@node"

Syntax:

STRIP ( string1, string2, [scan-from-direction] , [strip-toward- direction]),

Where

[scan-from-direction] = "L" | "R"

[strip-toward-direction] = "L" | "R"

Description:

STRIP locates the left-most or right-most occurrence of string2 in string1 and removes characters from the right or left, including string2. The value for scan-from-direction determines whether STRIP looks for the left-most or right-most occurrence of string 2 in string 1; the value for strip-toward- direction determines whether characters are removed from the left or right of where string2 starts.

If the either the scan-from-direction or the strip-toward-direction parameter is omitted, the value for the missing parameter is assumed to be the same as the one that is specified. If both these parameters are omitted, the default for both is assumed to be "R" (right).

Examples:

STRIP ( "Senior Vice President", "Vice", "L" ) " President" (Note the leading space)

STRIP ( "Senior Vice President", "Vice", "R" ) "Senior " (Note the trailing space)

STRIP ( "Senior Vice President", " " , "L") "Vice President"

STRIP ( "Senior Vice President", " ", "R" ) "Senior Vice"

STRIP ( "Senior Vice President", " ", "R", "L" ) "President"

Syntax:

SUBSTR ( field, start [,length [, pad] ] )

Description:

SUBSTR returns the portion of field starting at position start, with length characters, padded with the pad character if necessary.

The default for length is (length of string - start + 1). The default pad character is a blank.

Examples:

SUBSTR( "Vice-President", "6" ) "President"

SUBSTR( "Vice-President", "2", "3" ) "ice"

SUBSTR( "Vice-President", "7", "9", "s" ) "residents"

SUBSTR( "Vice-President", "11", "4" ) "dent"

Syntax:

TRIM ( field [,option] )

Description:

TRIM returns field with leading or trailing blanks removed. Option specifies whether to remove leading blanks (L) trailing blanks (R), or both (B).

Examples:

TRIM ( " Title ", "B" ) "Title"

TRIM ( " Title ", "L" ) "Title "

TRIM ( " Title ", "R" ) " Title"

Syntax:

UPPER ( field )

Description:

UPPER returns the value of field with any lower-case letters converted to upper-case.

Examples:

UPPER ( "Contoso" ) "CONTOSO"

UPPER ( "Bonnie" ) "BONNIE"

Syntax:

WORD ( field, n [, m] )

Description:

WORD returns m blank-delimited words starting with the nth word in field. WORD returns an empty string if field contains fewer than n words. The default value for m is 1.

Examples:

WORD ( "one of a kind", "1" ) "one"

WORD ( "one of a kind", "1", "2" ) "one of"

WORD ( "one of a kind", "3", "2" ) "a kind"

WORD ( "one of a kind", "5" ) ""

WORD ( "Shirleen H. Travers", "3" ) "Travers"

Syntax:

X500 ( address, field name [,index] )

Description:

X500 returns the contents of the named field for the specified address. If the address has two or more components with the same field name, the index value is used to specify the correct one.

The following X.500-type addresses are supported:

  • Microsoft Exchange Canonical (for example, /o=org/ou=site[/cn=container])

  • Lotus Notes Canonical (for example, cn=name/ou=site./o=org/c=country)

  • Lotus Notes Abbreviated Canonical (for example, name/site/org/country)

For example, suppose the value of the DN field is that provided in the sample X500 address below:

/o=Contoso/ou=Sales Office/cn=Recipients/cn=Notes_Users

The function would provide the following result:

X500 ( DN, "ou") "Sales Office" X500 ( DN, "o") "Contoso" X500 ( DN, "cn", 2) "Notes_Users"

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft