question

Dougbert107-7853 avatar image
0 Votes"
Dougbert107-7853 asked YukiSun-MSFT commented

Message Tracking log for Distribution Group Emails

I'm running into an issue with trying to see emails sent to Distribution Groups in our MS Exchange 2016 (on-premise) server. When I go through the message tracking log here's what I'm noticing:
Emails sent via Outlook clients to a Distribution Group will show a Receive Event for the distribution group SMTP address used in the email to the group.
Emails sent via standard SMTP protocols (either internal or external) appear to show up just as individual message events to every person on the distribution group.

This is making it incredibly difficult to write some powershell scripts to give us a count of the actual usage of our Distribution Groups given we're not seeing an "Expand" event in the Message Tracking Log.

Is there any additional logging we can turn up on Exchange to ensure these events are recorded or do we need to look at a journaling product to have a better idea of the hits we're seeing on our DGs in Exchange?

office-exchange-server-administrationoffice-exchange-server-mailflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YukiSun-MSFT avatar image
0 Votes"
YukiSun-MSFT answered YukiSun-MSFT commented

Hi @Dougbert107-7853,

Emails sent via standard SMTP protocols (either internal or external) appear to show up just as individual message events to every person on the distribution group.
This is making it incredibly difficult to write some powershell scripts to give us a count of the actual usage of our Distribution Groups given we're not seeing an "Expand" event in the Message Tracking Log.

Does the email address of the distribution list appear in the message tracking log of the message sent "via tandard SMTP protocols"?
Could you please run the command below for one of the messages sent via "standard SMTP protocol" so that we can learn how its message tracking log looks like? Please do remember to remove any private data involved like email address or domain name to protect your personal information:

 Get-MessageTrackingLog -MessageSubject <subject>

Furthermore, if you only need to count the messages sent to a particular distribution group, based on my test, you can have a go with the following command:

 Get-MessageTrackingLog | ? {$_.RelatedRecipientAddress -like "dg1@contoso.com"} | measure-object | fl count

33505-1.png


Update:
Using the command below instead (Get-TransportService|Get-MessageTrackingLog):

  Get-TransportService|Get-MessageTrackingLog -Start <starttime> -End <endtime> -MessageSubject <subject>



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



1.png (2.3 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YukiSun,

Thank you for the reply. I've attempted to use the latter command and I get a count of 0 so I know I'm not getting an accurate count. When I search for the email I sent on 10/16 in the log, it shows up looking like I emailed each DG member individually:
33600-powershell-exchange-dg-example.png


0 Votes 0 ·

Hi @Dougbert107-7853,

How about using the command below instead?

 Get-TransportService|Get-MessageTrackingLog -Start <starttime> -End <endtime> -MessageSubject <subject>

By the way, would you please elaborate a bit more about what you mean by "via standard SMTP protocols" so that I can see if I am able to reproduce this in my environment?

1 Vote 1 ·

That command ( Get-TransportService|Get-MessageTrackingLog) actually worked! I was able to export an Exchange tracking log with the events I was looking for! Thank you for your help on this!

1 Vote 1 ·
Show more comments