I'm trying to find all messages sent to a specific mail distribution list from all users and all other mail distribution lists from our Exchange 2010 servers.
I'm using the following powershell command
Get-MailBoxServer | Get-MessageTrackingLog -ResultSize unlimited -Recipients [email protected] -EventId RECEIVE |select MessageID,timestamp,Sender,@{Name="Recipients";Expression={$_.recipients}},MessageSubject | Export-Csv -Path "C:\sendall\MailboxReceiveAll.csv" -NoTypeInformation
While this does work, in that I get the data, but rather than the distribution group address appearing for Sender, the actual user's email address who composed and sent the mail on behalf of the group is returned.
Is there a way to get the distribution list email address or display name to be displayed as the sender or is this working as designed?
The
Sender
field in the message tracking log is specified with theSender
property in the message header(Table2 Fields that are Used to Classify Each Message Tracking Event):Besides, here is a snapshot of my .csv file:
Therefore, based on the test result and the official documentation, if we use a delegate to "Send On Behalf Of" a group to recipients, there will be a
Sender
property in the message header so much so that message tracking log will take the delegate email address as theSender
field, this is working as designed.However, if a user "Send As" a group, the
Sender
field will still display the email address of the group.