• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

mailstat Command Examples in Linux

by admin

mailstat command displays mail-arrival statistics. It parses a procmail-generated log file and displays a summary about the messages delivered to all folders (total size, average size, etc.). The log file will be renamed as logfile.old and a new logfile of size 0 will be created.

Below are the common fields from the mailstat command output and their meaning.
1. msgsfr: Shows the number of mail messages received by sendmail from this mailer.
2. msgsto: Shows the number of mail messages sent by sendmail using this mailer.
3. msgsrej: Shows the number of mail messages rejected by sendmail using this mailer.

mailstat Command Examples

1. To see the mail arrival stats:

# mailstat 

2. To keep the log file intact:

# mailstat -k 

3. To merge any errors into one line:

# mailstat -m 

4. To have a long display format:

# mailstat -l 

5. To use the old log file:

# mailstat -o 

6. To have terse display format:

# mailstat -t 

7. To keep silent if no mails:

# mailstat -s 

Filed Under: Linux

Some more articles you might also be interested in …

  1. avo: The official command-line interface for Avo (Command Examples)
  2. How to disable NFS client caching in CentOS/RHEL
  3. CentOS / RHEL 5 : How to use the faillog command to track failed login attempts
  4. How to find if NUMA configuration is enabled or disabled?
  5. How to Change Default Port of Apache On RHEL/CentOS 7
  6. atop: command not found
  7. aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI
  8. CentOS / RHEL 7 : Booting process
  9. core-validate-commit: Validate commit messages for Node.js core
  10. How To Add/Remove Locale Archive in CentOS/RHEL 5,6

You May Also Like

Primary Sidebar

Recent Posts

  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories
  • diff-pdf: Tool for comparing two PDFs
  • dict: Command line dictionary using the DICT protocol

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright