Installing and Administering Internet Services

156 Chapter 4
Installing and Administering sendmail
Troubleshooting sendmail
Configuring and Reading the sendmail Log
sendmail logs its mail messages through the syslogd logging facility.
The syslogd configuration should write mail logging to the file
/var/adm/syslog/mail.log. You can do this by adding the following
line in /etc/syslog.conf:
mail.debug /var/adm/syslog/mail.log
You can use the HP mtail utility to look at a specified number of the last
lines of the log file:
mtail 15
By default, mtail displays the last 20 lines of the log file. For more
information on the mtail utility, type man 1M mtail at the HP-UX
prompt.
For more information about configuring syslogd, see “Installing and
Configuring Internet Services” on page 27.
Setting Log Levels
You can set the log level with the -oL option on the sendmail command
line or on the OL line in the sendmail configuration file. At the lowest
level, no logging is done. At the highest level, even the most mundane
events are recorded. As a convention, log levels 11 and lower are
considered useful. Log levels above 11 are normally used only for
debugging purposes. We recommend that you configure syslogd to log
mail messages with a priority level of debug and higher. sendmail’s
behavior at each log level is described in Table 4-3.
Table 4-3 sendmail Logging Levels
Logging
Level
Behavior
0 No logging.
1 Major problems only.
2 Message collections and failed deliveries.
3 Successful deliveries.
4 Messages being queued (due to a host being down, and so on).
5 Messages being added to the queue in routine circumstances.