#!/bin/sh
# Using splogger to send the log through syslog.
# Using dot-forward to support sendmail-style ~/.forward files.
# Using binmail to deliver messages to /var/spool/mail/$USER by default.
# Using SVR4 binmail interface: /bin/mail -r
case "$1" in
start)
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start '|dot-forward .forward
|preline -f /bin/mail -r "${SENDER:-MAILER-DAEMON}" -d "$USER"' \
splogger qmail&
exit 0
;;
stop)
exec killall qmail-send
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 64
;;
esac
syntax highlighted by Code2HTML, v. 0.9.1