Bug revealed in Dynamic Distribution Groups on Exchange 2007

I have been lately involved in a question on Experts-Exchange that turned into a very interesting adventure that led me to discover a bug in the Dynamic Distribution Groups on Exchange 2007.

I have tested the below on Exchange 2007 SP2 rollup 2 and the bug was still there, however I need to mention that tests also proved it was solved on Exchange 2010.

The Setup

First let me give you a very brief idea about the setup, for the lab I have setup an EBS server and created 2 mailboxes on it “John Doe” and “Jane Jackson“.

Running Get-Recipient shows the 3 mailboxes in this organization

Taking a look at Active Directory Users and Computers also reveals that “John Doe” and “Jane Jackson” are located in the TestOu, the Administrator is located in the Users containter

The Plot

I have create a Dynamic Distribution Group called DynGrpGUI using the Exchange Management Console nothing fancy here just to include all users with an exchange mailbox located  in the “EBSLab.com/Users” container

Checking the “Preview” of this group shows only the Administrator account as expected

Next I have created a similar Dynamic Distribution Group called DynGrpCLI with the only difference that this one was created using the following PowerShell command

New-DynamicDistributionGroup "DynGrpCli" -OrganizationalUnit "Users" -recipientContainer "EBSLab.com/users" -recipientFilter {RecipientType -eq 'UserMailbox'}

Taking a look at the filter of DynGrpCLI it looks very similar to the one of DynGrpGUI

However clicking on the “Preview” will yield completely different results! As you notice in the below screen shot it is giving all Exchange mailboxes in the organization irrespectively in which OU they are.

The Bug

This difference left me perplex and I thought the bug was just from the MMC so I tried to filter out the group members from Power Shell using the following commands but the results were the same

$DynGrp = Get-DynamicDistributionGroup DynGrpCLI
Get-Recipient -filter $DynGrp.RecipientFilter

Pushing the test a bit further I have tried the same commands on the know-to-be-working group GynGrpGUI but again results were deceiving!

$DynGrp = Get-DynamicDistributionGroup DynGrpGUI
Get-Recipient -filter $DynGrp.RecipientFilter

The issue is that, like you can notice in the above commands, the Power Shell results are based only on the $DynGrp.RecipientFilter and do not take into consideration the the RecipientContainer part !

The Conclusion

The good news is that, even though this bug might lead us into error as users when checking the “Filter” results in both the Exchange Management Console or the Exchange Management Shell, it doesn’t affect at all the mail flow.

In fact, sending a test email to [email protected] and checking the message tracking log clearly show that the EXPAND event happened correctly and the email was sent only to the [email protected]

Get-MessageTrackingLog -server EBSLAB-Mail -Start "03/03/2010 12:30" -sender "[email protected]" | fl EventID,sender,recipients

Finally I want to remind you that I have done this test on an Exchange server 2007 patched with the latest updates available as I write, that’s SP2 rollup 2, and I have experienced the exact same thing. However running it on Exchange 2010 worked flawlessly.

I have been working in IT consultancy and solution integration since 1998 and I consider myself lucky to be, one in a few, making a living out of my passion. I am also member of the famous Experts Exchange (profile here) online community where I try my best to share what I have learned along the road.

Posted in Messaging & Collaboration Tagged with: , , , ,
2 comments on “Bug revealed in Dynamic Distribution Groups on Exchange 2007
  1. Martin says:

    Your Genius big boss 🙂

  2. deroyer316 says:

    Thank you posting the same issue is still present on Exchange 2010 SP2 RU4 as well and is a total pain in the butt.

1 Pings/Trackbacks for "Bug revealed in Dynamic Distribution Groups on Exchange 2007"

Leave a Reply

Your email address will not be published. Required fields are marked *