Forum Discussion
Is it possible to tally usage by email address including aliases for incoming email?
- 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
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.