Problem
Can sendmail(ADMN) log all incoming and outgoing emails? Solution
sendmail(ADMN) supports various logging levels, including the ability to log the sender and recipient of an email.
(Note: It does not support logging the content of an email.)
Logging is controlled by the LogLevel option (OL) in:
/usr/lib/sendmail.cfIf you want to log all incoming and outgoing email, level 9 is a good choice. Log in as root, edit sendmail.cf(SFF), and change:
# log level
OL1to:# log level
OL9This change will take effect once sendmail(ADMN) is stopped and
re-started. Log in as root and run the following to stop and
re-start sendmail(ADMN):/etc/rc2.d/P86sendmail stop
/etc/rc2.d/P86sendmail startThe logging information is placed in /usr/adm/syslog.
NOTE: The following explains the various logging levels that sendmail
supports (higher levels include the lower levels): 0 Minimal Logging
1 Serious system failures and security problems
2 Communication failures
3 Malformed addresses
4 Malformed qf filenames and similar minor errors
5 A record of each message received
6 SMTP VRFY attempts and messages returned to sender
7 Delivery failures excluding deferred mail due to lack of
resource
8 Successful deliveries
9 Mail deferred due to lack of resource
10 Each key as it is looked up, and the results of each
database lookup
11 All NIS errors
12 All incoming and outgoing SMTP commands and their
arguments
13 Bad user shells and world-writable files See also
The manual pages for sendmail(ADMN) and sendmail.cf(SFF)