csh -cf 'qmail-start ./Mailbox splogger qmail &'
to start their qmail operation. The second argument to qmail-start is the command to receive logging information. This can be any program. splogger is the program which ships with qmail, so most people will be using this.
The first parameter to splogger "qmail" is the string which will be prepended to each log message.
splogger will send all messages to syslog with the "info" priority, unless the message starts with alert: or warning: in which case it will have "alert" or "warning" priority respectively.
This will log all messages from the "mail" facility with priority "debug" and up to the file /var/log/maillog. Do not forget that you need to separate the selector (mail.debug) and the action (/var/log/maillog) with a tab.
Since splogger only handles three priorities (or levels), there will only be a few other options which will be useful:
#!/bin/sh cd /var/log mv maillog maillog.old cp /dev/null maillog chmod 644 maillog kill -HUP `cat /etc/syslog.pid`
This will move the log file from maillog to maillog.old and tell the syslogd service to reload its files. Some systems may have the process file in a location other than /etc/syslog.pid. Another location may be /var/run/syslog.pid. Check your syslogd man page for more information.
As a side note, if you are running low on space, you could run a cron script which does something like:
rm maillog.old.gz nice -n 20 /usr/local/bin/gzip /var/log/maillog.old
to scrunch up the log (they compress nicely!).