On Wed, Jul 04, 2001 at 08:26:45PM +0200, Moritz Schmitt wrote:
> Hello,
> 
> I got too questions about qmail and tcpserver. If the tcpserver program is
> off topic here, please advise me to the right list.
> 
> 1. How can I delete every message existing in the queue?

If this isn't a FAQ, it should be. Stop all qmail processes. Have the
compile qmail source handy. 'rm -rf /var/qmail/queue', and 'make setup
check' in the qmail source directory. (There are other ways, but this
way is, IMHO, the simplest for someone who doesn't understand the
architecture of qmail.)
> 
> 2. I'm using tcpserver to start qmail and it seems to work. But there is a
> little thing I don't understand. On my FreeBSD 4.2 RELEASE machine I added
> the follwing configuration file into /etc/rc:
> 
> /usr/local/bin/tcpserver -p -x /etc/tcp.smtp.cdb -u 82 -g 81 0 smtp \
> /var/qmail/bin/smtpd

Wow. It's strongly recommended, even in the file itself, not to play
with /etc/rc. If you want to stick with files in /etc, use rc.local. I
personally am now a big fan of /usr/local/etc/rc.d/*.sh -- FreeBSD now
runs any files matching that specification at boot time. I use this
method to start svscan, which then starts all the tcpserver processes
(qmail-smtpd, qmail-pop3d, et al) for me* -- see Life With qmail:

http://www.lifewithqmail.org/

and modify the 'run' scripts to taste.

* Of course, it also starts dnscache, tinydns, axfrdns, and publicfile.
I love DJBware. ;)
> 
> After I added this line I rebooted the machine and it stopped right at the
> point where it was supposed to excute the line above. It didn't crash and I
> was able to talk to my server on port 25 it just didn't proccess the rest of
> the startup scripts. Because it looked the way that
> /var/qmail/bin/qmail-smtpd was waiting on stdin I added an ampersand at the
> and of the line so /bin/sh would start it as a background process. It seems
> to work that way but I'm confused because I read twice in two different docs
> that no ampersand is needed. At least it wasn't printed there. Can anyone
> enlighten me?
> 
> -Moritz

See above -- if you're going to run tcpserver, I highly recommend that
you go whole hog and use daemontools to bring stuff up as well. Can't
wait until openssh has an option that runs under daemontools without too
much extra overhead!


-- 
Greg White
Those who make peaceful revolution impossible will make violent
revolution inevitable.
                -- John F. Kennedy

Reply via email to