Jump to content

Recommended Posts

Posted

I'm trying to search my on-site Exchange server for all emails received by any mailbox here from a particular external domain within the last week. I can find lots of examples of my mailboxes sending to a particular external domain, but none the other way around, and plenty which rely on a particular sender or recipient. I'm after a wildcard on the domain. Can anyone help please?

 

Thank you

 

Stuart

Posted (edited)

Quite easy to do with Powershell

 

Get-TransportServer |

Get-MessageTrackingLog -ResultSize Unlimited -Start “09-11-2020” -End “13-11-2020” |

where {$_.recipients -like "*domain1.com*"} |

select sender, {$_.Recipients}, timestamp |

export-csv -delimiter "," -path C:\andcombined.csv -notype

Edited by djm968
  • Thanks 1
Posted
Thanks, but this is showing me my recipients sending to a specified domain, I'm after the other way around. I want to see anyone I have on-site who has received an email from a specified domain. So I want to know all my mailboxes who have received an email from (for example) *.gmail.com.
Posted
Thanks, but this is showing me my recipients sending to a specified domain, I'm after the other way around. I want to see anyone I have on-site who has received an email from a specified domain. So I want to know all my mailboxes who have received an email from (for example) *.gmail.com.

 

I'm just testing it but in theory just change "$_.recipients -like" to "$_.sender -like"

 

I wish i'd known this command (about the transport logs) last week when i need to to track something for the cops!

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...