<<
Can someone send me their working qmail startup script that uses
tcpserver for both smtp and pop3d??? Thanks a bunch.
>>
Here's a sample.
I'm sending it partly as assistance, partly because I'd love to hear if
I'm doing anything wrong. : )
Be sure to put in your domain name. My lines are long, I chopped them
here to avoid odd wrapping. I'm also using vpopmail's vchkpw, you'll have
to modify that line for your particular password checker. Shoot, since I'm
thinking of things to change, you'll also have to use your correct UID and
GID numbers as well. While we're at it, this might not work on anything
but Linux. That enough to worry about?
steve
----------------------------------------------------------
#!/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 "`cat /var/qmail/control/dot-qmail`" splogger qmail &
/usr/local/bin/tcpserver -x/etc/tcp.smtp.cdb -u502 -g501 0 smtp \
/var/qmail/bin/qmail-smtpd &
env - PATH="/var/qmail/bin:/usr/local/bin" tcpserver 0 pop-3 \
/var/qmail/bin/qmail-popup domain.com /virtuals/bin/vchkpw \
/var/qmail/bin/qmail-pop3d Maildir &
echo "qmail"
touch /var/lock/subsys/qmail
;;
stop)
# Stop daemons.
echo -n "Shutting down qmail: "
killproc qmail-send
killproc tcpserver
#killproc qmail-pop3d
echo
rm -f /var/lock/subsys/qmail
;;
*)
echo "Usage: qmail {start|stop}"
exit 1
esac
exit 0