/etc/rc.d/init.d/qmail
#!/bin/sh
#
# qmail This shell script takes care of starting and stopping qmail.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /var/qmail/bin/sendmail ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting qmail: "
PATH="/var/qmail/bin:$PATH"; export PATH
qmail-start ./Maildir/ splogger qmail 2 &
echo -n "qmail "
touch /var/lock/subsys/qmail
# cfl970618 Added -c10 to limit number of qmails running (def=40)
tcpserver -v -u 7770 -g 2108 -c10 -x/etc/tcp.smtp.cdb 0 smtp \
/var/qmail/bin/qmail-smtpd 2>&1 | \
splogger smtpd 2 &
echo -n "tcpserver "
tcpserver -x/etc/tcp.pop3.cdb 0 pop-3 \
qmail-popup id.wustl.edu \
/bin/checkpassword qmail-pop3d Maildir >/dev/null 2>&1 &
echo "pop3d"
;;
stop)
# Stop daemons.
echo -n "Shutting down qmail: "
killproc qmail-send
killproc tcpserver
echo
rm -f /var/lock/subsys/qmail
;;
*)
echo "Usage: qmail {start|stop}"
exit 1
esac
exit 0