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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. duc Command Examples in Linux
  2. gitmoji Command Examples
  3. mitmproxy Command Examples
  4. kdocker: command not found
  5. jekyll Command Examples
  6. git describe: Give an object a human-readable name based on an available ref
  7. hakyl-init Command Examples
  8. lpq: command not found
  9. pivpn Command Examples in Linux
  10. –force V/s –nodeps : rpm command options to install or uninstall a package

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright