[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to exclude addresses from dynamic distribution lists

Posted on 2008-06-24
14
Medium Priority
?
1,824 Views
Last Modified: 2010-04-21
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
0
Comment
Question by:dougdog
  • 10
  • 4
14 Comments
 
LVL 10

Expert Comment

by:uid94130
ID: 21854354
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
0
 

Author Comment

by:dougdog
ID: 21855025
would there be anyway without disabling reports as the user wants to know if any users are failing
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21855665
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.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 10

Expert Comment

by:uid94130
ID: 21855692
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!
0
 

Author Comment

by:dougdog
ID: 21874928
is there no way to just exclude a group of accounts
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21877524
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!
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21881367
I just tested the query and it works in my play ground. Please let me know if you need more details on this topic.
0
 

Author Comment

by:dougdog
ID: 21911434
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
0
 
LVL 10

Accepted Solution

by:
uid94130 earned 2000 total points
ID: 21914203
Sorry. I got mixed up between Exchange 2003 and 2007. :)

As OPath filter you can use the -not operator. Please check the following 2 examples:

1. The filter excludes the users that have have the department set as "specialString"
New-DynamicDistributionGroup -Name "Allcompanyusers" -Recipientcontainer domainname.co.uk -RecipientFilter {((WindowsEmailAddress  -like '*@company.co.uk') -and -not(department -eq 'specialString'))}

2. The filter excludes the users that start with "SystemMailbox{" or "CAS{"
New-DynamicDistributionGroup -Name "Allcompanyusers" -Recipientcontainer domainname.co.uk -RecipientFilter {((WindowsEmailAddress  -like '*@company.co.uk') -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS{*'))}
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21914366
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.
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21914382
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.
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21914541
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.
0
 
LVL 10

Expert Comment

by:uid94130
ID: 21914724
Please ignore my repeated post. Seems my browser got busy and was refreshing the last link.
0
 

Author Closing Comment

by:dougdog
ID: 31470095
thanks ure help is much appreciated
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question