New Dynamic group based on smtp use to deny outgoing email
Guys, Am trying to use http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/820016d9-b5e6-4c94-99b5-6579cf8d2293/#42f2337e-06d4-4139-ab8a-c271a1998d35 as a guide but unfortunately getting no where...To make it easy her is what i am trying to accomplish. The current Exchange setup is Exchange 2007 SP3 with RU7. using the code below the DL will create but when i try and view the members no one is present in EMC tried using the DL's to just apply the rule incase it was working and i'm blind and nope not working New-DynamicDistributionGroup -Name "Block External Email" -Alias "Block All External Email" -OrganizationalUnit "corp.internal" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Email Addresses -like 'smtp:*@otml.internal'))} -RecipientContainer "corp.internal" Another go New-DynamicDistributionGroup -Name "Block External Email" -Alias "Block_All_External_Email1" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (EmailAddresses -like '*@otml.internal'))} Tried using '*@otml.internal'))} as well. The issue i have is that it isn't actually grabbing all of the user's with an @otml.internal address i plan on using this dynamic DL to restrict all user's with this email address from sending outbound email. Has anyone been able to get anything like this to work?
July 8th, 2012 11:51pm

Hi, To view "membership" of a DynamicGroup with a custom filter, you need to use EMS. Example: Get-Recipient -Filter (Get-DynamicDistributionGroup "Block External Email").RecipientFilter Also, note that expanded groups is stored in a Cache for four hours. See: Transport Rules and Group Membership I haven't used a DynGroup in a Transport Rule so I don't know how good/bad it works. Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 12:30am

Yeah i don't think it's the best trying it this way but will continue on...Issue atm is that it's picking up everyone with the @otml.internal namespace for some reason this org still keeps that as a secondary with them wanting the filter applied to only user's with @otml.internal as the primary any ideas?
July 9th, 2012 8:27pm

Hi Tony, Do you want to create a Transport Rule to restrict members of DDG to send outbound mails? Please make sure the DDG is created correctly first. Does the result as expected(via EMS)? $members = Get-DynamicDistributionGroup DDGname Get-Recipient -RecipientPreviewFilter $members.recipientfilter | select displayname,primarysmtpaddress Frank Wang TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 10th, 2012 2:38am

Hi, No the results are not present using thep preview filter in EMS but Frank i can see from teh Get-Receipent results that it's picked up users who's primary SMTP is not @otml.internal. I have tested the restriction transport rule but creating a dynamic group containing just myself (populated an AD field) and this functions sending the user a bounce back and dropping the message.
July 10th, 2012 8:30pm

Unfortunately it looks like the -like function will return everyone containing the email address not just primary smtp. I've created seperate rules 7 of them adding user's in manually which will require manual addition and deletion or user's for the moment.
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2012 11:49pm

Hi, Why not replace EmailAddresses with PrimarySmtpAddress?Martina Miskovic
July 17th, 2012 12:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics