question

ChrisM-8834 avatar image
0 Votes"
ChrisM-8834 asked ChrisM-8834 commented

Exchange mailbox messages received and sent

We are considering moving from an on-prem Exchange 2016 server to Office 365, but we have several mailboxes with high message volume.  These mailboxes are used to receive a large amount of messages from our hosted CRM, and also relay messages from the CRM to external recipients.  We've had to modify the frontend receive connector on the server to allow for the message volume, but this is something we can't do in Office 365 - we're stuck with the 3600/hour receive and 30/minute send limits.  So I'm trying to determine a way to find out how many messages each of these mailboxes receive per hour, and how many they are sending per minute.  Is there a way in the web console or EMS to get this info?

office-exchange-server-administrationoffice-exchange-server-mailflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EricYin-MSFT avatar image
0 Votes"
EricYin-MSFT answered ChrisM-8834 commented

Hi,
You can try the following script to get the number of messages, the start/ending time can be accurate into a minute, like "09/01/2018 5:00 PM":

 $From = "6/1/2019" 
    
 $To = "6/14/2019" 
    
     
    
 $intSent = 0 
    
 $intSentSize = 0 
    
 $intRec = 0 
    
 $intRecSize = 0 
    
 $Mailbox = "administrator@domain.com" 
    
     
    
 Get-TransportService | Get-MessageTrackingLog -Sender $Mailbox -ResultSize Unlimited -Start $From -End $To | ForEach { 
    
     If ($_.EventId -eq "RECEIVE" -and $_.Source -eq "SMTP") { 
    
         $intSent ++ 
    
         $intSentSize += $_.TotalBytes 
    
     } 
    
 } 
    
     
    
 Get-TransportService | Get-MessageTrackingLog -Recipients $Mailbox -ResultSize Unlimited -Start $From -End $To | ForEach { 
    
     If ($_.EventId -eq "DELIVER") { 
    
         $intRec ++ 
    
         $intRecSize += $_.TotalBytes 
    
     } 
    
 } 
    
 $intSentSize = $intSentSize/1MB 
    
 $intSentSize = '{0:n4}' -f $intSentSize 
    
 $intRecSize = $intRecSize/1MB 
    
 $intRecSize = '{0:n4}' -f $intRecSize 
    
     
    
 Write-Host "`nResult:`n--------------------`n" 
    
 Write-Host "This Mailbox Total Sent:"$intSent, ", Total Sent Size(MB):"($intSentSize) 
    
 Write-Host "This Mailbox Total Receive:"$intRec, ", Total Receive Size(MB):"($intRecSize) 
    
 Write-Host "`n--------------------`n" 



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 13
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Eric. I'm not great with scripting but I will take a look at this and see about working with it.

0 Votes 0 ·

I am writing here to confirm with you how the thing going now?
If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·

Thanks Eric, I had a drive fail on a different server over the weekend so had to focus on that. Would this script be saved as a .ps1 file and then executed through WIndows PS? I'd like to give it a shot but like I said I'm not great with scripting.

0 Votes 0 ·
Show more comments
AndyDavid avatar image
0 Votes"
AndyDavid answered ChrisM-8834 commented

Two ways:
Look through the SMTP protocol logs and count connections:
https://docs.microsoft.com/en-us/exchange/mail-flow/connectors/configure-protocol-logging?view=exchserver-2019

or
PerfMon

Transport SMTP Receive: Messages Received/sec

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Andy, to be more specific I'm looking for information from the Client Frontend connector, as the CRM makes authenticated connections over port 587. That monitor doesn't seem to have an option for that connector. I did find it under MSExchangeFrontendTransportSMTPReceive, but I'm not sure if it's the right place because I didn't seem to be generating any results at all in the monitor window. Any thoughts?

0 Votes 0 ·