Link to home
Start Free TrialLog in
Avatar of dougdog
dougdog

asked on

How to exclude addresses from dynamic distribution lists

Hi experts,
I have multiple accepted domains on my exchange server
i am trying to build dynamic distribution lists for each company that contain all the users email addresses.
i set this up using
New-DynamicDistributionGroup -Name "Allcompanyusers" -Rec
ipientcontainer domainname.co.uk -RecipientFilter {(WindowsEmailAddress  -like '*@company.co.uk')}#
However when we use this to email all outr users the user sending the email recieves multiple failures to addresses such as service accounts we have setup ie backup@domain ups@domain etc and also systems accounts like globalevents oabversion schema-root.
My question is how can i exclude this addresses is it possible to put these addresses in a group and exclude the group some way
Avatar of uid94130
uid94130
Flag of Romania image

The easies way would be:
If you want to have no NDRs generated for messages sent to this list, you can just set the "Delivery reports options" (in the Advanced Tab (RTM)) of the DL to "Do not send delivery reports".

Check this link for more info:
http://technet.microsoft.com/en-us/library/bb629517(EXCHG.80).aspx
Avatar of dougdog
dougdog

ASKER

would there be anyway without disabling reports as the user wants to know if any users are failing
Only if you modify the filter to exclude these recipients.

E.g.
You could search for a field that is filled to all the mailboxes, clear it and use the field in the query.

Or populate an extension attribute for all the users except the special ones, but you would have to make sure all new users get this field filled too in this case.
Pretty hard... Only if you modify the filter to exclude the special mailboxes.

E.g.
You can find a field that is filled on all the users, clear it on the special mailboxes and use this field in the LDAP filter.
The other way round would be to populate a field like extension attribute only to the normal users, but in this case you need to make sure that all new accounts will get this field filled!
Avatar of dougdog

ASKER

is there no way to just exclude a group of accounts
Just popped to my mind!

You could fill a field (e.g. department) of the special mailboxes, fill it with a special string (that is not used in as department in the whole company) and use the NOT operator in the LDAP query.

Something like:
(!(department=specialString))

I can't try it right now but I will check it in the morning on my play environment and let you know!
I just tested the query and it works in my play ground. Please let me know if you need more details on this topic.
Avatar of dougdog

ASKER

so what youre saying is the accounts i dont want to include in the list
add a unused field
im not sure what you mean by not operator ldap
ASKER CERTIFIED SOLUTION
Avatar of uid94130
uid94130
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One more thing: to modify an existing Dynamic DistributionGroup you can use the Set-DynamicDistributionGroup cmdlet where you can also use the -RecipientFilter parameter as mentioned in my previous post.
One more thing: to modify an existing Dynamic DistributionGroup you can use the Set-DynamicDistributionGroup cmdlet where you can also use the -RecipientFilter parameter as mentioned in my previous post.
One more thing: to modify an existing Dynamic DistributionGroup you can use the Set-DynamicDistributionGroup cmdlet where you can also use the -RecipientFilter parameter as mentioned in my previous post.
Please ignore my repeated post. Seems my browser got busy and was refreshing the last link.
Avatar of dougdog

ASKER

thanks ure help is much appreciated