Connector for Lotus Notes Directory Synchronization- Part 2

This is part 2 of the directory synchronization blog.

Using the rules from the mapping tables, we pull all the attributes that have changed since our last update. We have to load the rules because those rules determine what attributes we want to pull over. The attribute list that we want to pull is set here exchsrvr\conndata\dxamex\amap.tbl. We only pull users from those databases listed in the SOURCE address books on the connector, and we only pull objects that we DID NOT create. We know which objects we created because of the $NotesDXAStamp being set to the GUID of the Connector for Lotus Notes that created the object. This list is then reduced to only the objects in Domino have been

modified since:

1. Either the last update was done (pulled from the LastExtract={date} line item in \exchsrvr\Conndata\DXANOTES\PCTA.TBL.

2. Since 01/01/1980, which is the hard coded timestamp that we do for full reloads which of course does everyone!

We make this list of the objects that have been modified since then (looking at the document properties on the DOCUMENT INFO tab, you will see the modified timestamp which is what is compared to either #1 or #2 above depending on whether this is a Full Reload or an Update. All these objects attributes are calculated using the rules (from exchsrvr\conndata\DXAMEX\mapnotes.tbl above and are then committed to the DXAMEX.TXT file in the \exchsrvr\conndata\temp directory.

As you can see all of the attributes will be created based on the rules in the mapnotes.tbl. Once this file has been created, the PCTA.TBL file's lastextract= attribute is updated to the current time.

The Connector for Lotus Notes creates a list of the users that it owns in Active Directory. It does this by checking the "importedFrom" attribute, which is set to the GUID of the connector. The DXA process then takes the dxamex.txt file and it is imported by attribute into the objects that already exist (or a new object is created in AD) based on the Secondary NOTES proxy address on each object. If you look at an AD object that was created by the Connector for Lotus Notes, you will notice a secondary proxy address of type NOTES (example: NOTES:UID=71a19cf-a786cca4-88256c85-43910f). This is populated with the UNID of that Domino user (which you can see above in the dxamex.txt sample), which was extracted from the person document (more below in the FAQ). Please also note that any object that has an IMPORTEDFROM attribute set to the connector GUID that does NOT have a corresponding user in the DXAMEX.TXT file (matched by the secondary proxy address), will be deleted. This is how the Connector for Lotus Notes processes deletes.

Once the dirsync process has process all users, it will shut itself down and give statistics for Imports (from Domino) and exports (to AD).

Dirsync loads in the rules from the table files (TBL) that are used to when pulling data from the Lotus Domino PNAB (public names and address book) users.

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: Alias= ISEQUAL( ShortName, "", SUBSTR( FullName, 1, 64 ), ShortName ) lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: FullName = ISEQUAL( Resource, "", X500( FullName, "CN" ), Strip( FullName, ";", "L", "R" ) ) lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: Name = ISEQUAL(Resource, "", X500( FullName, "CN" ), Strip( FullName, ";", "L", "R" ) ) lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: TA = "NOTES:" Strip( FullName, ";", "L", "R" ) "@" MailDomain lsdxa(1729)

2006/06/26 16:27:01-LME-NOTES-DXA(0898) 4 60374:> Rule: DN = ISEQUAL( Resource, "", X500( FullName, "CN" ), Strip( FullName, ";", "L", "R" ) ) lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: UNID = UNID lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: FirstName = FirstName lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: LastName = ISEQUAL( LastName, "", ISEQUAL( FirstName, "", X500( FullName, "CN"), "" ) , LastName) lsdxa(1729)

2006/06/26 16:27:01-LME-NOTES-DXA(0898) 4 60374:> Rule: Company=Company lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: Department = Department lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: Office = Location lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: Initials = Initials lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: NOTESADDR = Strip( FullName, ";", "L", "R" ) "@" MailDomain lsdxa(1729)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60374:> Rule: lsdxa(1729)

Launch Notes interface (API)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 2 41100:Initializing Lotus Notes Interface lsnabapi(549)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60906:Initializing PCT API for agent LME-NOTES-DXANOTES pcta(332)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60903:Defaulting response limit to 0 pcta(489)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60904:Defaulting timeout limit to 0 pcta(551)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60907:Successfully initialized subsystem pcta(580)

Looking in PCTA.tbl for the "lastextract=" entry, which will tell us what entries are newer than our last update. Keep in mind that if this were a full reload, we simply hardcode this data to 01/01/80 12:00AM

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 60954:Determine last extract date pcta(2557)

The data in the 41121 event below is the date that was found in the "lastextract=" query above. We then check the Domino server's source address book for changes in any of the source address books (in this case our source address book is names.nsf). To figure out which person documents have changed, we check the "Modified Data" on the person document. This attribute can be checked by going to the properties of the Person document in the Source Address book.

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 4 64136:Looking for changes on XFORBOX/NotesCert in names.nsf dxanotes(1949)

2006/06/26 16:27:01- LME-NOTES-DXA(0898) 3 41121:Looking for changes since 12/11/2002 01:22:08PM lsnabapi(3107)

Matches the Appropriate Recipient Policy to apply to the users that we will be creating in the AD.

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 08320:The associated recipient policy object is 'CN=Default Policy,CN=Recipient Policies,CN=E2kORG,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange2000,DC=com'. cfgmgrpt(3127)

We process each user with a modified date newer than the "lastextract=" date. There is only one in this case, so we analyze his person document and log and fields that are not present. You would see one of these for every user that that we find. Please note that we only log the fields that don't contain any data that we process. EXAMPLE: If this user's Person Document had contained a OFFICEPHONENUMBER, we wouldn't have logged anything.

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'CompanyName' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'Department' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'Location' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'JobTitle' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'OfficePhoneNumber' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'CellPhoneNumber' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 41118:Field 'OfficeFAXPhoneNumber' is not present in Notes document lsnabapi(1590)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 60945:Updating table with processed MIF update information pcta(1815)

Update the PCTA.TBL file to have the new "lastextract=" date.

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 60912:Attempting to commit changes to table pcta(671)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 60910:Opened propagation control table dxanotes\pcta.tbl pcta(700)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 60944:Writing into propagation control table pcta(4784)

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 4 60913:Changes have been committed pcta(756)

SUMMARY is output of how many objects (person documents) were found that need to be updated into the AD.

2006/06/26 16:27:03- LME-NOTES-DXA(0898) 3 41110:The Notes DXA processed 1 updates dxanotes(2128)

Initialization of the DXA to process the updates.

2006/06/26 16:27:03- LME-NOTES-DXA(0d3c) 3 00502:LME-NOTES-DXA is initializing stdmain(765)

Identifies the control files (exchconn.ini) and loads any parameters we need to use from the registry

2006/06/26 16:27:03- LME-NOTES-DXA(0d3c) 4 00503:Controller name is CONTROL-SERVICE, Configuration filename is C:\Program Files\Exchsrvr\bin\exchconn.ini stdmain(766)

2006/06/26 16:27:11- LME-NOTES-DXA(0d3c) 3 00504:LME-NOTES-DXA started stdmain(893)

2006/06/26 16:27:11- LME-NOTES-DXA(0d3c) 4 60906:Initializing PCT API for agent LME-NOTES-DXAMEX pcta(332)

2006/06/26 16:27:11- LME-NOTES-DXA(0d3c) 4 60903:Defaulting response limit to 0 pcta(489)

2006/06/26 16:27:12- LME-NOTES-DXA(0d3c) 4 60904:Defaulting timeout limit to 0 pcta(551)

2006/06/26 16:27:12- LME-NOTES-DXA(0d3c) 4 60907:Successfully initialized subsystem pcta(580)

2006/06/26 16:27:17- LME-NOTES-DXA(0d3c) 4 60908:Terminating PCT API for agents pcta(618)

2006/06/26 16:27:17- LME-NOTES-DXA(0d3c) 4 60909:Successfully terminated PCT API for agents pcta(629)

Summary for Import of Notes data into DXAmex.txt. This indicates that the extract portion of the dirsync process is done.

2006/06/26 16:27:17- LME-NOTES-DXA(0d3c) 3 60379:Directory Synchronization Import is complete. MS.DXAMEX successfully imported 1 entries, and had problems importing 0 entries. lsdxa(1376)

DXA process is shut down

2006/06/26 16:27:17- LME-NOTES-DXA(0d3c) 3 00505:LME-NOTES-DXA is ending, last return code was {Successful} stdmain(968)

Terminating the NOTES API we use to access their Directory (PNAB)

2006/06/26 16:27:18- LME-NOTES-DXA(0898) 4 60908:Terminating PCT API for agents pcta(618)

2006/06/26 16:27:18- LME-NOTES-DXA(0898) 4 60909:Successfully terminated PCT API for agents pcta(629)

2006/06/26 16:27:18- LME-NOTES-DXA(0898) 2 41102:Terminating Lotus Notes Interface lsnabapi(758)

Summary for Export of data from DXAMEX.TXT to the AD.

2006/06/26 16:27:18- LME-NOTES-DXA(0898) 3 60378:Directory Synchronization Export is complete. MS.DXANOTES successfully exported 1 entries, and had problems exporting 0 entries. lsdxa(1160)

This is the end of the dirsync FROM Domino to the Active Directory.

Reference material:

Gateway Messaging Connectors Architecture Configure Directory Synchronization XFOR: Customizing Directory Synchronization Between Exchange and Notes