• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 384
  • Last Modified:

Linux: Count Mail Sent in Past Hour

From a Linux command line is there any way to find out how many email messages have been sent by the server within the past hour?
0
hankknight
Asked:
hankknight
  • 3
1 Solution
 
duncanb7Commented:
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

/var/log/maillog , mail log file may put into diff dir depend on your system



Note: for find with last hour
==============================
find srch_dir -cmin -60 # creation time

or


find srch_dir -mmin -60 # modification time
or


 find srch_dir -amin -60 # access time
0
 
duncanb7Commented:
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

Could you try this  that I changed ?
0
 
duncanb7Commented:
Thanks , hava a nice day and good weekend
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now