Forum Discussion

Chris Parker's avatar
Chris Parker
Iron Contributor
Dec 29, 2016

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 can report on the usage of each of the individual email addresses vs just reporting on the user in aggregate.

 

Just in case I'm not being clear, I don't want to know that I received 100 emails last month, I want to know that I received 75 to domain1.com and 20 to domain2.com and 5 to domain3.com.

 

Ultimately, I'm trying to find out which domain(s) is used least so I can begin planning to remove it.

  • 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

     

     

  • 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.

Resources