none
Dynamic Distribution List not sending to specific site

    Question

  • Hi folks,

    We use DDLs in my company, but one of them has started to give hassle.

    We have two offices in two different countries, but all MBs and accounts are on the same domain. The mailboxes are divided between a couple of datacenters, but all sit within the same Exchange environment.

    Three DDLs exists - Office 1, Office 2, and All Staff. The individual office one work fine. The All Staff one only picks up users for Office 1, not Office 2. However, when I do a query on the DDL from PowerShell, I get all the users from Office 2 showing as recipients. I'm using this query:

    $members = Get-DynamicDistributionGroup AllStaff
    (Get-Recipient -RecipientPreviewFilter $members.LdapRecipientFilter | sort DisplayName | select Displayname,PrimarySmtpAddress)
    (Get-Recipient -RecipientPreviewFilter $members.LdapRecipientFilter | select Displayname,PrimarySmtpAddress).count

    I'm new to TSing DDLs - I know how they work, but I don't understand if I query and it shows correct, why sending an email will skew the recipient list.

    Any help would be appreciated.

    Thanks.

    Thursday, February 23, 2017 11:21 AM

Answers

  • Just to reply to this, I figured out what was wrong. It was the stupid -RecipientContainer parameter that was set to the wrong OU.

    In fact, it was working for years, but I don't know why as it was always wrong.

    Just glad I eventually figured it out.

    • Marked as answer by yeoo_andys_ni Thursday, June 15, 2017 4:06 PM
    Thursday, June 15, 2017 4:06 PM

All replies

  • Hi,

    Could you share output of Get-dynamicdistributiongroup "All staff one" | ft RecipientFilter

    $FTE = Get-DynamicDistributionGroup "All staff one"  
    Get-Recipient -RecipientPreviewFilter $FTE.RecipientFilter -Resultsize unlimited > Txt.txt



    Abrar Kaberi| MCSA Office 365 | MCSA Exchange server 2010 | Red Hat Certified Engineer | https://www.linkedin.com/in/abrar-kaberi-46a483102/



    • Edited by Akabe Thursday, February 23, 2017 12:48 PM
    Thursday, February 23, 2017 11:36 AM
  • Hi,

    As you've mentioned in the subject of this post, is the Office2 can't send to specific site?

    Do you have receive any NDRs or error messages?

    We can get the numbers of the allstaff group as below and check if the office 2 members are included:

    $FTE = Get-DynamicDistributionGroup "allstaff"

    Get-Recipient -RecipientPreviewFilter $FTE.RecipientFilter

    Hope it helps.


    Regards,

    Jason Chao


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, February 24, 2017 6:53 AM
    Moderator
  • Thanks for the replies.

    I am not prepared to share the information on here, simply for the fact that it gives the names of my colleagues. I'm not comfortable with this, I'm sorry.

    However, as stated in the my original post, if I query both office 1 and office 2 DDLs I get the correct users. When I query the AllStaff DDL, I get all staff, in both offices - therefore the correct users.

    The query I run, and pasted in the OP, reports back 634 names. The queries both Abrar and Jason have provided me output the same 634 names. The users sending to all staff do not receive any form of NDR or error. The email, for want of a better word, just vanishes. I can do message tracking, but it returns no results for the emails in question.

    I assume when I'm attempting to determine the recipients of a DDL, using the PowerShell queries, this is the essentially what Exchange does when an email is actually being sent?

    Thanks,

    Friday, February 24, 2017 8:36 AM
  • Hi,

    Thnx for replying. Understand your concern. But i am not asking you to share the user information.

    The All Staff one only picks up users for Office 1, not Office 2. However, when I do a query on the DDL from PowerShell, I get all the users from Office 2 ---> I am asking to share the recipient filter for All staff to see what the set query is. Mixture of Custom and extension attributes define the DDG. 

    So we need to check the search query for All staff DDG and why it is including Office 2 users. 

    Hope this helps


    MCSA Office 365 | MCSA Exchange server 2010 | Red Hat Certified Engineer | https://www.linkedin.com/in/abrar-kaberi-46a483102/


    • Edited by Akabe Friday, February 24, 2017 10:11 AM
    Friday, February 24, 2017 10:10 AM
  • Ah, gotcha. Sorry for the confusion. Query is:

    {(((((CustomAttribute1 -like '0123') -or (CustomAttribute1 -like '4567')) -and ((EmailAddresses -like '*@ourdomain*') -and (RecipientType -eq 'UserMailbox') -and (RecipientTypeDetails -eq 'UserMailbox'))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))))}

    I'd like to point out I inherited these filters and have tried to clean them up with little success. Hopefully you will see something here I can't.

    Thanks.


    Friday, February 24, 2017 1:29 PM
  • Ah, gotcha. Sorry for the confusion. Query is:

    {(((((CustomAttribute1 -like '0123') -or (CustomAttribute1 -like '4567')) -and ((EmailAddresses -like '*@ourdomain*') -and (RecipientType -eq 'UserMailbox') -and (RecipientTypeDetails -eq 'UserMailbox'))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))))}

    I'd like to point out I inherited these filters and have tried to clean them up with little success. Hopefully you will see something here I can't.

    Thanks.


    No worries.

    I assume all the users (Office 1 and 2) have same smtp domain set as primary address i.e. SMTP:*@domain.com.

    The existing query that you have mentioned will include all the users with *@domain.com. That is why u see office 2 users in all staff DDG.

    You need to remove

    EmailAddresses -like '*@ourdomain*

    and just have two extension attributes in it and make sure Office 2 users do not have below extension attributes set

    CustomAttribute1 -like '0123') -or (CustomAttribute1 -like '4567

    In short, you need to create a query in a way that Office 1 and office 2 users will be on different Extension attributes or create a new custom query that will include a different sub set of extension attribute in it 

     Hope this helps and i dont confuse this


    MCSA Office 365 | MCSA Exchange server 2010 | Red Hat Certified Engineer | https://www.linkedin.com/in/abrar-kaberi-46a483102/

    Friday, February 24, 2017 1:56 PM
  • Hi,

    Akabe is right, have you tried the command? If you have any questions, feel free to post back.


    Regards,

    Jason Chao


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, February 27, 2017 2:26 AM
    Moderator
  • You've lost me a little if I'm honest.

    I need to use CustomAttribute1 as it's globally set to the office codes for our users.

    The problem is though, due to a mixture of trusts, federations and migrations more than one company in our domain uses Office2, so at least two different domains in Office2. This is why I used our email address as no one outside of our domain has our email address.

    I'm also having the issue where if I edit the query at all, I get a lot more recipients picked up - like room, shared and equipment mailboxes.

    What I don't understand is, if I preview the DDL in PowerShell, why do I see the correct list of users - is this not really what Exchange does to determine the list of users before sending?

    Thanks for the feedback so far.

    Tuesday, February 28, 2017 3:28 PM
  • Thanks for your reply.

    We can check the message tracking log to see if the all the correct listed users in the recipient list.

    Please refer to the command below:

    Get-MessageTrackingLog –ResultSize Unlimited –Start "03/2/2017 2:30PM” –End “03/06/2015 3:30PM” –Sender “test@contoso.com” | fl >c:\MTL.txt

    Hope it helps.


    Regards,

    Jason Chao


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, March 6, 2017 2:45 AM
    Moderator
  • Just to reply to this, I figured out what was wrong. It was the stupid -RecipientContainer parameter that was set to the wrong OU.

    In fact, it was working for years, but I don't know why as it was always wrong.

    Just glad I eventually figured it out.

    • Marked as answer by yeoo_andys_ni Thursday, June 15, 2017 4:06 PM
    Thursday, June 15, 2017 4:06 PM