# # qmail /etc/init.d script for qmail (http://www.qmail.org/) # # Version: @(#) /etc/init.d/qmail 1.00 03-Sep-1997 # # Author: Larry Doolittle # derived from skeleton by Miquel van Smoorenburg, # # # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) touch /var/lock/subsys/qmail env - PATH="/var/qmail/bin:$PATH" \ csh -cf 'qmail-start ./Mailbox splogger qmail &' # should limit RLIMIT_AS here, but bash apparently doesn't # know that exists. For now it is hacked into qmail-smtpd. # 0.5M data should be plenty, resists DOS attacks tcpserver -u 1911 -g 2081 0 smtp /var/qmail/bin/qmail-smtpd & echo $! >/var/lock/subsys/qmail-smtpd ;; stop) killall qmail-send kill `cat /var/lock/subsys/qmail-smtpd` rm -f /var/lock/subsys/qmail-smtpd rm -f /var/lock/subsys/qmail ;; *) echo "Usage: qmail {start|stop}" exit 1 esac exit 0