"How To" Guides for UNIX System Administration

sendmail log

How to configure the sendmail log

To create a log of all messages being sent through sendmail, add a line to the /etc/syslog.conf file:

mail.debug /usr/spool/mqueue/syslog

To make the syslog configuration changes take effect, the syslog process should be restarted:

refresh -s syslogd

The logs can be rotated by size or elapsed time by adding a rotate parameter to the line in the syslog.conf file, or on a daily basis with a cron script:

rotatelogs

if [ -d /usr/spool/mqueue ]
then
cd /usr/spool/mqueue
cp syslog syslog.`date +"%d"` 2> /dev/null
cat /dev/null > syslog 2> /dev/null
fi

Last updated Wednesday June 6, 2007


Printer-friendly PDF* format:

How To Guides for UNIX System Administration

This Section

You are currently viewing this page in XHTML 1 Style Sheet* format (* see Clicklets for more infomation). This document is also available in XHTML 1*XML*HTML 4*HTML 5 Style Sheet*HTML 5 XML*HTML 5 non-XML* XHTML 2* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.