tcpserver / queue cleaning
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? 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 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
Re: tcpserver / queue cleaning
On Wed, Jul 04, 2001 at 08:26:45PM +0200, Moritz Schmitt wrote: 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: That's not the right place to start services, but that's beyond the scope of this list. /usr/local/bin/tcpserver -p -x /etc/tcp.smtp.cdb -u 82 -g 81 0 smtp \ /var/qmail/bin/smtpd 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? In this case you do need the ampersand, but again this is not a qmail question, but a general Unix question. I'd suggest you read http://www.lifewithqmail.org. Set things up as outlined there, and start svscan from a script in /usr/local/etc/rc.d Chris PGP signature
Re: tcpserver / queue cleaning
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
[OT] RE: tcpserver / queue cleaning
I'm using /etc/rc to start the tcpserver process because I read it in Running qmail; Richard Blum. To quote him on that: Once the qmail-smtpd boot script is created, it must be run from a system boot script. On a FreeBSD system this can be the /etc/rc script. Because the qmail-smtpd script just contained the tcpserver line I thought it's no big deal to write it directly into /etc/rc. Anyways, I or the book, one of us sucks. Maybe both. But thanks for the hint I'm going to read Life with qmail and I'm removing my entries from /etc/rc. -Moritz -Original Message- From: Greg White [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 8:47 PM To: qmail Subject: Re: tcpserver / queue cleaning 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
Re: [OT] RE: tcpserver / queue cleaning
Moritz Schmitt [EMAIL PROTECTED] wrote: I'm using /etc/rc to start the tcpserver process because I read it in Running qmail; Richard Blum. To quote him on that: Once the qmail-smtpd boot script is created, it must be run from a system boot script. On a FreeBSD system this can be the /etc/rc script. Because the qmail-smtpd script just contained the tcpserver line I thought it's no big deal to write it directly into /etc/rc. It is a big deal, if you don't understand what you're putting in there. Anyways, I or the book, one of us sucks. Maybe both. No. You're a newbie. You don't suck. The book, from the opinions of knowledgable qmail experts on this list, appears to suck quite badly. The advice you quote above is further evidence of this. But thanks for the hint I'm going to read Life with qmail and I'm removing my entries from /etc/rc. Yes, Life with qmail is definitely the way to go for most novices. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ ---