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:
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