Forum Discussion
Chris Parker
Dec 29, 2016Iron Contributor
Is it possible to tally usage by email address including aliases for incoming email?
Over the years we've accumulated five domains that all act as email aliases. Meaning, every user as at least five email addresses: user@domain1.com, user@domain2.com, etc. I'd like to know if I c...
- Dec 30, 2016
Hello,
From what I know, there is no prebuilt report for what you want to do, but I think you can still obtain the info you need with a bit more work. I think you can run something like this in PowerShell and obtain pretty much all you might need:
Get-MessageTrace -RecipientAddress *@alias_domain -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -pagesize 5000 |
Select-Object Received, SenderAddress, RecipientAddress, Subject, Status, ToIP, FromIP, Size, MessageID, MessageTraceID | Out-GridView
or simply
(Get-MessageTrace -RecipientAddress *@alias_domain -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -pagesize 5000).count
VasilMichev
Dec 30, 2016MVP
You should be able to gather some info from the message trace logs, however parsing those will be tricky. You can only get them for a limited days and you will have multiple entries for each message sent to an alias (i.e. you will have another entry that corresponds to the "resolved" recipient).
Here's an example script to get you started: https://gallery.technet.microsoft.com/office/Office-365-Mail-Traffic-afa37da1
Probably some 3rd party reporting tools can help.