4
test -f ${MS}/${ST}.2 && mv ${MS}/${ST}.2 ${MS}/${ST}.3
test -f ${MS}/${ST}.1 && mv ${MS}/${ST}.1 ${MS}/${ST}.2
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
10.4 The mailstats Program | 367
test -f ${MS}/${ST}.0 && mv ${MS}/${ST}.0 ${MS}/${ST}.1
test -f ${ST} && mv ${ST} ${MS}/${ST}.0
touch ${ST}
fi
fi
exit 0
As before, the statistics are mailed to postmaster. But instead of being truncated, the
statistics file is renamed stats_arch/statistics.0. A series of renames (mv(1)) are used
to maintain a week??™s worth of copies. These copies allow the ambitious administrator
to create a program for gathering weekly summaries from seven archived daily
copies.
The mailstats program allows you to specify a different name for the statistics file. By
using the -f command-line switch, you can view statistics from any of the archived
files:
% mailstats -f /etc/mail/stats_arch/statistics.4
10.4.4 The mailstats Program??™s Switches
The mailstats program has a modest number of command-line switches. They are
summarized in Table 10-5 and described more fully in the sections that follow.
10.4.4.1 -c
Use submit.cf instead mailstats command-line switch
When you run the MSP form of sendmail (?§2.5.4 on page 66) you use two different configuration
files, the sendmail.
Pages:
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664