Dynamic Distribution Group – Opposites are good too!

Have hit an interesting error in Exchange 2007.

We have a Dynamic Distribution Group (DDG)that sends to all staff (Lets call is “Email All Staff”).

Originally the script was as follows:

Set-DynamicDistributionGroup "Email All Staff" -RecipientFilter{ Company -eq "Our Company Name" } –RecipientContainer "AD.Root.Node"

Which took everyone who had an email address and sent the email to them

When users leave our employment we change their account password and hide them from our address list before deleting them, the rational being that we can then share the mailbox to someone to dredge through for anything important and they can monitor any external email for the 1st month after they leave.

The problem is that any email that gets sent to the “Email All Staff” DDG gets evaluated and sent to the hidden users too.

Ahhh I though, if I have the script do the following:

Set-DynamicDistributionGroup "Email All Staff" -RecipientFilter{ -not(HiddenFromAddressListsEnabled -eq $false) -and(Company -eq "Our Company Name" )} –RecipientContainer "AD.Root.Node"

then it will only send to mailboxes that have not got the hidden attribute set.

I was thus happy that I’d solved a little problem and would help our end users by them not getting additional email that was not relevant.



A support call drops into my queue say that an email to “Email All Staff” has not been delivered to any recipients.

Humm, lets investigate

Looking at the properties of the DDG (Exchange Management Console > Recipient Configuration > Distribution Group > Open “Email All Staff” > Filter Tab > Preview)



You can see all the mailboxes who don’t have the “Hide from Exchange address lists” checked are shown.

So all seems fine with the DDG so lets investigate the email.

I fire up the Exchange Message Tracking tool (Exchange Management Console > Toolbox > Message Tracking) and drill down to the message.



Looking at the screen shot above you can see that the email expanded and delivered to only three recipients – “Richard, Ann and Simon”

Looking at the properties of these mailboxes you can see that they are all Hidden from the address book – The exact opposite of what the script and the Exchange Management Console says……



After 3 hours on the phone Microsoft want use to upgrade to the latest Service Pack and retest. I’ll update when I have more information……