HP-UX Mailing Services Administrator's Guide
Configuring and Administering Sendmail
Troubleshooting Sendmail
Chapter 2100
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:
00***/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 week’s 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-----