The Notes Management Agent Cannot Delete Members from a Distribution List (319528)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.2 SP1

This article was previously published under Q319528

SYMPTOMS

When the Notes management agent tries to update a distribution list, the management agent can add members, but it cannot delete them. When this behavior occurs, error messages are not generated.

CAUSE

This issue may occur if the connected directory discovery excludes the distribution list that the management agent is trying to update. The LIST_MEMBER function prepares deltas of the list membership by examining the Import.lst file. If the list is not discovered, only Add transactions occur; Modify transaction do not occur.

RESOLUTION

To resolve the issue, make sure that the distribution list is discovered before you run the update. If you cannot do so, You may want to modify the CD Lists from Connectors script, which builds the member lines. To open this script, start MMS Compass, click Design MA, click the Control Connected Directory tab, click the Output Construction Templates tab, and then click the CD Lists from Connectors script.

The following script is an example of a script that allows distribution list membership to be re-added without discovery:
# if the member belongs to another MA. Let's build 
# it as if it was a foreign user.
if $exist ( $AT.zcNotesDn ) = F
then

# store the RDN of the Metaverse DN in v_Name & write
# it's constituent name components into the Metaverse
  $v_Name = $dn_component("$dn",1)

# WATCH OUT FOR MULTIPART DN'S LIKE THOSE FROM EXCHANGE
  IF $TEST_CHAR( "+", $v_Name ) = T
  THEN
    $v_Name = $GET_SUBSTRING("$v_Name", "", " +")
  ENDIF

  $v_Name = $proper_name("$v_Name")
  $I_personal_name()=$v_Name	 

#  build the LastName according to the desired hierarchy level
   if $MA($zcNotesForeignLevel) = All
   then 
#      build a unique NOTES name based on the hierarchy

#      form a unique name by taking the DN & stripping 
#      off all component labels including the RDN
       $v_dninter=$dn
       $v_dninter=$replace("$v_dninter",",OU=",",")
       $v_dninter=$replace("$v_dninter",",O=",",")
       $v_dninter=$replace("$v_dninter",",C=",",")
       $v_dninter=$replace("$v_dninter",",L=",",")
       $v_dninter=$replace("$v_dninter",",ou=",",")
       $v_dninter=$replace("$v_dninter",",o=",",")
       $v_dninter=$replace("$v_dninter",",c=",",")
       $v_dninter=$replace("$v_dninter",",l=",",")
       $v_dninter=$replace("$v_dninter",",DsaName=",",")
       $v_uniquefield =$get_substring("$v_dninter",",","")
  
        if $exist ( $MA ( $zcNotesForeignOU ) )  = T
        then

#           build a unique NOTES DN based on the NOTES foreign OU
            $v_dn=CN=($md.givenName )($md.initials )($md.sn)(,$MA($zcNotesForeignOU)) [$v_uniquefield]
            $v_st0 = ($md.givenName )($md.initials )($md.sn) [$v_uniquefield]
            $v_fullname = $v_dn
        else
            $v_dn=CN=($md.givenName )($md.initials )($md.sn) [$v_uniquefield]
            $v_fullname=($md.givenName )($md.initials )($md.sn) [$v_uniquefield]
        endif

    else

#       build a NOTES name not based on the hierarchy (may not be unique)
        if $exist ( $MA ( $zcNotesForeignOU ) ) = T
        then

#          build a NOTES DN based on the NOTES foreign OU
           $v_dn=CN=$v_Name(,$MA($zcNotesForeignOU))
           $v_st0 = ($md.givenName )($md.initials )$md.sn
           $v_fullname=$v_dn
        else
            $v_dn=CN=$v_Name
            $v_fullname=$v_Name
        endif
    endif

#   replace every ',' by '/' in the dn
    $v_dn=$replace("$v_dn",",OU=","/OU=")
    $v_dn=$replace("$v_dn",",O=","/O=")
    $v_dn=$replace("$v_dn",",C=","/C=")
    $v_dn=$replace("$v_dn",",L=","/L=")
    $v_dn=$replace("$v_dn",",DsaName=","/DsaName=")
    $v_fullname=$replace("$v_fullname",",OU=","/OU=")
    $v_fullname=$replace("$v_fullname",",O=","/O=")
    $v_fullname=$replace("$v_fullname",",C=","/C=")
    $v_fullname=$replace("$v_fullname",",L=","/L=")  
#    $AT.zcNotesDn = $v_fullname    

# CHECK TO SEE IF THE LIST HAS CHANGED YET
    IF $v_currentList=$v_list
    THEN
        $AT.zcNotesDn = +Members: +$v_fullname    
    ELSE
        $v_currentList=$v_list
        $AT.zcNotesDn =-Members: $c_newline+Members: +$v_fullname    
    ENDIF

endif
				

You must also add the following line to the end of the CD Accounts from Connectors script. To open this script, start MMS Compass, click Design MA, click the Control Connected Directory tab, click the Output Construction Templates tab, and then click the CD Accounts from Connectors script.
# THIS WAS ADDED TO FIX THE CD LIST FROM CONNECTOR BUG
$v_list=$v_dn
				

If you insert a -member: entry and you do not place a distinguished name (also known as DN) immediately before the member lines that show addition, the existing membership is treated as if it is null and the additions process is treated as if this record is a new record. The following text is an example of the output that you may receive:
M LIST=Dist1/O=Notes1Wk%NAMES.nsf 
-ListName: Dist1/O=Notes1Wk
-Database: NAMES.nsf
-FirstName: 
-MiddleInitial: 
-LastName: 
-Members: 
+Members: +CN=Jane Doe/OU=MMS_Users/O=NOTES1WK
+Members: +CN=Joe Smith/OU=MMS_Users/O=NOTES1WK
+Members: +CN=John Buck/OU=MMS_Users/O=NOTES1WK 
---
				

NOTE: This script may trigger replication of the LIST function in the Notes management agent; however, the membership is updated correctly.

MORE INFORMATION

Extra lines similar to the following lines may be detected immediately before the member lines:
Com
Root Collectives
Root Security
				

If these lines are detected, see the following article in the Microsoft Knowledge Base for more information about a hotfix for the LIST_MEMBER function:

304738 $List_Member Function Does Not Work with Foreign User Output


Modification Type:MajorLast Reviewed:9/30/2003
Keywords:kbprb KB319528