Freigeben über


Exchange 2007 / Exchange 2010 – Interesting recipient update service issue…

I recently had a case come across my desk where end users reported that after changing certain attributes in the directory these attributes were reverted to original or incorrect values.

In this case what we had was a centralized portal for information where end users could request that updates be made to their accounts.  For example, if I was married I could request that my last name be updated in the directory to my new last name.  This of course would imply that if I had email addresses based off first and last name that I would also want those addresses updated.

In Exchange 2003 the recipient update service (RUS) would scan the directory for object changes based on the objects USN.  If we found an object that was changed after the USN stamped on the RUS, we knew we would need to take action against it.  In this case the RUS always utilized a single Exchange server to calculate addresses and a single domain controller to read objects and write objects. 

In Exchange 2007 and Exchange 2010 the RUS has become a process initiated by a task rather then scanning the directory for changes.  By default when any task is run that alters a user object, such as set-mailbox or set-user, the recipient update service is called by the task.  In this case calling the recipient update service means utilizing any Exchange Server’s system attendant and utilizing any domain controller – we are no longer limited to having a single Exchange server or single domain controller responsible for these tasks.

When the task set-user or set-mailbox contacts the RUS it provides a complete set of user attributes as read from the directory.  The RUS then calculates valid email addresses, and provides them back to the set task.  Once this information is provided the set task then commits the changes to the directory.  Proxy addresses are always calculated and sent to the task which will re-write them to the directory.  Other attributes, such as name etc, are only written to the directory if they were specified in the set command to be changed.

In the example of set-user and set-mailbox we have provided the –domainController switch so that a static domain controller could be utilized.  For a mailbox server the task will always attempt to find a server with the mailbox role installed (hence having a system attendant where the RUS lives) in the same Active Directory site.  If one is not present, the task will look to adjacent Active Directory sites.

Let’s take a look at how this changing from a directory scan to a task based system could cause the symptoms I outlined above.

I have a program that allows a user to change their name information and their ability to be seen in the address list.  My email address policies are set to stamp information based on First.Last@domain.com (PRIMARY) and alias@domain.com (SECONDARY).

Environment:

  • Two domain controllers – DC1 and DC2.
  • Two Exchange mailbox servers – MBX1 and MBX2.

Example:

In this instance a user named BARBARA SMITH wants to change her last name to JONES.  Her account currently has the following attributes relevant to our example:

givenName:  BARBARA

sn:  SMITH

msExchHideFromAddressList: FALSE

proxyAddresses (2):  smtp:Barbara@domain.com; SMTP: Barbara.Smith@domain.com

The application has received the request to process the change.  The following command is called:

set-user –identity Barbara –lastName Jones –domainController DC-2

At this point the task contacts the directory and reads the attributes.  It then contacts an Exchange server, and passes in the current attributes plus the attributes that changed.  At this time the RUS evaluates this information and determines that an email address change should occur.  The email address change should include a primary SMTP address of Barbara.Jones@domain.com.  This information is provided back to the task.

The task then executes a write operation against DC-2 since the domain controller is statically specified.  The attributes written to the directory are as follows:

sn:  JONES

proxyAddresses (3): smtp:Barbara@domain.com; SMTP:Barbara.Jones@domain.com; smtp:Barbara.Smith@domain.com

The next step of the application is to reset the hide from address book value.  This happens regardless of whether or not the value needs to be updated.  The following command is called:

set-mailbox –identity BARBARA –hiddenFromAddressList:$FALSE

At this point the task contacts the directory and reads the attributes.  In this case domainController was not specified, and the task chooses at random DC1.  The task reads the following values from DC1.

givenName:  BARBARA

sn:  SMITH

msExchHideFromAddressList: FALSE

proxyAddresses (2):  smtp:Barbara@domain.com; SMTP: Barbara.Smith@domain.com

You’ll note that the values are the original values – this is because DC1 has not had time to fully replicate the changes from DC2.

Because I used the set-mailbox command, these attributes are passed into the RUS along with the attribute to change – in this case hiddenFromAddressList.  The RUS evaluates the attribute set, and determines that the email addresses that should be on this user are barbara@domain.com and barbara.smith@domain.com.

The task receives this feedback, and on DC-1 updates the following attributes:

msExchHideFromAddressList

proxyAddresses

After the domain controllers have had time to converge if I were to look at the attributes of the user here is what I see:

givenName:  BARBARA

sn:  JONES

msexchHideFromAddressList:  FALSE

proxyAddresses (2):  smtp:Barbara@domain.com; SMTP: barbara.smith@domain.com

It would essentially appear that the last name change was successful but the recipient update service did not update the user successfully.  In actuality, after tracing the issue, it was determined that one command utilized the static domain controller, the other command did not, and this resulted in the RUS evaluating two sets of different information for the same user and thus appearing as if changes did not occur that should have occurred.

In the end this issue was rectified by ensuring that when multiple set operations are included in sequence that all set operations specify the same domain controller.

Comments

  • Anonymous
    January 01, 2003
    I recommend you review the following: http://msexchangeteam.com/archive/2006/10/02/429053.aspx http://msexchangeteam.com/archive/2006/11/21/431608.aspx http://msexchangeteam.com/archive/2006/10/09/429135.aspx And this one addresses your particular move-mailbox question and why email address policies are applied during the move. http://msexchangeteam.com/archive/2007/01/05/432086.aspx TIMMCMIC

  • Anonymous
    January 01, 2003
    Hi Tim, I wanted to ask a question about something that his happening in our environment, and I just want to understand it a little better. I know that the RUS role has changed in Exchange 2007, whereas in 2000/03 it would work alongside ADUC, now its a seperate process. So when a user would get created and then his email address would get created on the exchange side rus would manage that change from AD. My company is currently transitioning to 2007, and we are running interop mode, 2003 and 2007 in the same domain. I started moving mailboxes and I noticed something strange after a mailbox has been moved. Lets say I have a test account in AD, and it has a mailbox on 2003. First name: Anton Last Name: Test Primary smtp address is atest@mydomain.com now, In 2003 I know I can change the last name, or add something to it, so that it would say Test JediMaster. Now the primary smtp remains atest@domain When I move this mailbox over to 2007, the primary smtp changes to atestjedimaster@domain.com I think that RUS is responsible for this change, but I am not sure if I can prevent the way it works, or alter it somehow. It seems to want to take firstname,lastname and make them the primary smtp address. Some of our users have extra entries in the last name, such as a suffix, Jr, Senior, Doctor, ESQ. Now I know we can use extensionattributes, but I havent explored that option yet. Is there any possible work around for my dillema ? Thank you, Anton