HP-UX Mailing Services Administrator's Guide (B2355-91064)

Other details logged in the syslog file are time delay in delivering the message (delay=),
type of mailer used (mailer=), priority of the message, relay machine, and the status of
the message. Queued messages and SYSERRs are also logged.
Storing Off Old Sendmail Log Files
At typical logging levels, every piece of mail passing through Sendmail adds two or
three lines to the mail log. A script to manage the growth of the mail log could be run
nightly, at midnight, with an entry in root’s crontab file. Following is an example of
a crontab entry for a script called newsyslog:
0 0 * * * /var/adm/syslog/newsyslog
The following example shows what the script /var/adm/syslog/newsyslog might
contain. The script assumes that syslog is configured to direct mail logging to
/var/adm/syslog/mail.log.
#!/usr/bin/sh
#
# NEWSYSLOG: Save only the last weeks Sendmail logging.
cd /var/adm/syslog
#
mv mail.log.6 mail.log.7
mv mail.log.5 mail.log.6
mv mail.log.4 mail.log.5
mv mail.log.3 mail.log.4
mv mail.log.2 mail.log.3
mv mail.log.1 mail.log.2
cp mail.log mail.log.1
kill -1 `cat /var/run/syslog.pid`
Printing and Reading the Mail Queue
You can print the current contents of the mail queue with the following command:
mailq
The output looks similar to this example:
/var/spool/mqueue (3 requests)
----Q-ID----- --Size--- -----Q-Time---- ----Sender/Recipient-----
h3TA9Bb29701 86 Wed Feb 9 07:08 janet
ess@vetmed.umd.edu
ebs@surv.ob.com
h3TAATe29713 1482 Tue Feb 15 7:05 carole
bja@edp.cloq.potlatch.com
vls@ee.cmu.edu
h3TABWB29731 10169 Tue Feb 15 8:10 chuck
hrm@per.stmarys.com
sys6!sysloc@njm
98 Configuring and Administering Sendmail