Re: off topic: qmail config


Subject: Re: off topic: qmail config
From: Paul Schinder (schinder@pobox.com)
Date: Mon Jan 17 2000 - 05:55:32 MST


At 10:20 AM +0200 1/17/00, Ivailo Djilianov wrote:
>Hi,
>I know I probably shouldn't be posting this here, but can someone just point
>me to the right place!
>I need to set up qmail as my mail transfer agent. I configured everything,
>following the INSTALLs, READMEs, and HOWTOs, but at the end they all come up
>to a phrase "put the startup script (for qmail) where you put all the other
>startup scripts"...now, I figured this should be /etc/rc.d/init.d/
>I found a tool, chkconfig, that should be used when messing with this
>directory, but I can't seem to make it run with qmail. Anybody who might
>help?

You're under no obligation to use chkconfig. You can simply put your
startup script in /etc/rc.d/init.d (make sure it's executable), and
make the appropriate symbolic links into the right runlevel
directories for your machine. In my case I usually only worry about
/etc/rc.d/rc3.d. If you want to make life a little simpler, change
the insides of your sendmail script to start up qmail instead, and
that way your machine will use the S80sendmail links that are already
there. But it should be possible to use chkconfig if you want to
with a script named qmail. I never use it, but I believe that
chkconfig is only looking for a certain comment in the headers of the
script. Indeed, that's what the man page says (you did read the man
page, right?).

I chose the "rip the guts out of sendmail" approach myself. The only
thing you need to watch out for is rpm "helpfully" replacing your
sendmail script during an upgrade. The guts of my
/etc/rc.d/init.d/sendmail looks like:

[ ${NETWORKING} = "no" ] && exit 0

[ -f /var/qmail/bin/qmail-start ] || exit 0

# See how we were called.
case "$1" in
   start)
         # Start daemons.
         echo -n "Starting qmail: "
         csh -cf '/var/qmail/rc &'
         /usr/local/bin/tcpserver -x /usr/local/etc/tcpd.smtp.cdb -v
-u 502 -g 50
1 0 smtp /var/qmail/bin/qmail-smtpd 2>&1 | /var/qmail/bin/splogger smtpd 3 &
         success "qmail startup"
         echo
         touch /var/lock/subsys/sendmail
         ;;
   stop)
         # Stop daemons.
         echo -n "Shutting down qmail: "
# killproc qmail-send
         kill `/sbin/pidof qmail-send`
         kill `/sbin/pidof tcpserver`
         echo
         rm -f /var/lock/subsys/sendmail
         ;;
   *)
         echo "Usage: sendmail {start|stop}"
         exit 1
esac

exit 0

>Using YellowDog CS 1.1 on a B/W G3/300
>
>Ivailo Djilianov
>-----------------
>System Administrator
>Ulpia Investment management Inc.
>24 Denkoglu str, Sofia 1000, Bulgaria
>http://www.ulpia.com
>mailto:i.djilianov@ulpia.com
>-----------------

--
Paul Schinder
schinder@pobox.com



This archive was generated by hypermail 2a24 : Tue Feb 01 2000 - 17:50:57 MST