Total Emails Sent and Received Per Hour

This script counts the number of e-mails that are sent and received in your Exchange environment every day and separated by hour.

 
 
 
 
 
4 Star
(1)
3,496 times
Add to favorites
Exchange
11/17/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Export mails from a atime range
    1 Posts | Last post December 06, 2018
    • Hello, is it also possible to specify a time range? Example: mails from 01/01.2018 from 12:30 to 14:00 and from 17:00 to 18:00? And then, export for example,  to an excelfile?
  • Total Emails Sent and Received Sizes Per Hour
    2 Posts | Last post April 19, 2018
    • Hi Nuno,
      
      Is it possible to set the threshold on the Exchange Server or on User to lock down the send emails to 100/minute or 100/5 minutes. Once it reaches the value it should send an alert or can we disable the user itself.
      
      In our environment users are sending 1000's of emails/Hour. We want to lock down it by keeping some threshold for a user so he cannot send more than 100 emails/minute.
      
      Looking forward for your response at the earliest.
      
      Thanks,
      Hari
    • Hi Hari,
      
      To keep an eye on the number of emails users are sending (on a per-user basis) you will have to use a script similar to this one (or this one: https://gallery.technet.microsoft.com/scriptcenter/f2af711e-defd-476d-896e-8053aa964bc5?redir=0) but modified it to give you details per user.
      
      Once you know the users you want to limit, have a look at "Understanding message rate limits and throttling" (https://technet.microsoft.com/en-us/library/bb232205(v=exchg.160).aspx#Policies), especially at Throttling Policy and its RecipientRateLimit and MessageRateLimit parameters.
      Hope this helps!
      
      Regards,
      Nuno
  • Total Emails Sent and Received Sizes Per Hour
    2 Posts | Last post April 24, 2014
    • Hi Nuno,
      is it possible to add a field to show the total per hour on sent and received messages?
      
      thanks
    • Hi Guilherme,
      
      What do you mean exactly? This script already shows the total sent and received e-mails per hour...
      
      Best regards,
      Nuno
  • Confusion regarding sent/recieve
    2 Posts | Last post January 31, 2014
    • Nuno,
      
      Our company wanted to see how many e-mails we sent/recieve. I ran in to your script, it does exactly what I want/need. Thanks for that.
      
      The trigger by what I thougt, whats wrong, is quite easy. We've got a lot(!) of automatisc datacommunication by e-mail. So i've allway's thougt that we would send more, than we recieve..
      
      But your tool showed me that we recieve the double of what we send. So I take a look in the source. 
      
      What I've noticed, is when you get the Sent e-mails, you take a look at -EventID - RECEIVE. When you get the Receiver e-mails, you take a look at -EventID -DELIVER.
      
      It's weird, right? Or am I thinking wrong? Love to hear from you! 
    • Hi Robert,
      
      I understand your confusion. However, An EventID of RECEIVE with a Source of STOREDRIVER will match e-mails that were sent by users using, for example, Outlook or OWA.
      If you look at the definition of RECEIVE in TechNet (for message tracking), is says: "A message was received by the SMTP receive component of the transport service or from the Pickup or Replay directories (source: SMTP), or a message was submitted from a mailbox to the Mailbox Transport Submission service (source: STOREDRIVER)." As you can see, this is exactly what you want.
      
      The EventID DELIVER will count every e-mail that was delivered to a user's mailbox. As such, if an internal user sends an e-mail to another internal user, it will count as one e-mail sent and one e-mail received.
      
      You might also be interested in identical scripts I wrote that count the number of e-mails sent/received by day (http://gallery.technet.microsoft.com/f2af711e-defd-476d-896e-8053aa964bc5) and per week (http://gallery.technet.microsoft.com/ba5bd64d-6025-415a-86ed-2b51f9aabaf0 and http://gallery.technet.microsoft.com/Total-Emails-Sent-and-c1daf5e7).
      
      Please let me know if this makes sense.
      
      Best regards,
      Nuno
  • Confusion regarding result
    2 Posts | Last post January 31, 2014
    • dear Nuno,
      I ran the command and got the below mentioned result. Please let me know if it is both sent/receive value since result is not clear. You have mentioned that separate send/receive results will be given but only this result comes out. Your help is required.
      
      Saturday,11/16/2013,485,1573,148,138,793,293,129,136,448,1525,1757,1869,1737,16
      85,1260,1266,701,499,337,353,329,336,306,212,
      Sunday,11/17/2013,451,1632,187,108,134,136,119,142,162,194,297,312,345,306,282,
      258,241,341,259,256,355,289,322,300,
      Monday,11/18/2013,1266,1563,529,109,109,161,172,193,1770,10341,13942,13297,1220
      2,9554,9382,11657,12393,10888,5984,3182,1421,969,613,554,
      Tuesday,11/19/2013,1003,2159,822,228,860,440,227,287,1843,10026,13530,13609,132
      82,10607,10031,11503,12846,11565,5644,3009,1597,963,681,585,
      Wednesday,11/20/2013,1013,2009,649,307,588,316,209,298,1956,9589,13699,13869,12
      722,9857,9131,11228,11829,10341,5201,2431,1428,977,743,501,
      Thursday,11/21/2013,1120,1800,630,298,609,308,264,234,1637,9731,13680,13187,128
      74,9856,9226,11206,12609,10215,5263,2602,1386,1093,724,505,
      Friday,11/22/2013,1140,2379,587,235,1289,295,151,271,1602,8913,13028,12780,
    • Dear Jeff,
      
      Apologies for the long delay in replying to you...
      Is that the exact output you receive? I am sure it is not as it is incomplete... If you look at the code, the script will start by writing to the console:
      Write-Host "`nSent" -ForegroundColor Green
      
      Followed by the "headers" for the output:
      Write-Host "DayOfWeek,Date,00:00,01:00,02:00,03:00,04:00,05:00,06:00,07:00,08:00,09:00,10:00,11:00,12:00,13:00,14:00,15:00,16:00,17:00,18:00,19:00,20:00,21:00,22:00,23:00" -ForegroundColor Yellow
      
      And finally the results itself:
      $strTotalSent 
      
      
      Then, it will do the same for the received e-mails:
      Write-Host "`nReceived" -ForegroundColor Green 
      Write-Host "DayOfWeek,Date,00:00,01:00,02:00,03:00,04:00,05:00,06:00,07:00,08:00,09:00,10:00,11:00,12:00,13:00,14:00,15:00,16:00,17:00,18:00,19:00,20:00,21:00,22:00,23:00" -ForegroundColor Yellow 
      $strTotalRec
      
      
      As such, you should be receiving moreon your output...
      
      Regards,
      Nuno