RE: tcpserver blues
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joerg Lenneis Sent: Friday, May 11, 2001 4:31 AM To: Nick (Keith) Fish Cc: Chris Ochap; Qmail Mailing List Subject: Re: tcpserver blues Nick (Keith) Fish: Chris Ochap wrote: start() { # Start daemons. echo -n $Starting $prog: daemon /var/qmail/rc /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/qmail echo return $RETVAL } Try adding 21 to the end of the tcpserver line, so: /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd 21 [...] That is not correct, that will just redirect stderr to stdout. You need to put a single at the end of the line that starts up tcpserver to put the process into the background. regards, -- Joerg Lenneis email: [EMAIL PROTECTED]
RE: tcpserver blues
Hi Chris You put this query up on the 10th. and tc lewis replied? I would endorse his answer to you, look into supervise from the daemontools toolkit. If you are starting off with qmail and want to get it up and going then go with one of the established methods of setting it up - Life with qmail and/or Tetsu Ushijima's excellent qmail-conf which has complete configuration scripts for setting up qmail. http://www.din.or.jp/~ushijima/qmail-conf.html I believe that it is not recommended to run qmail in the background, and with tcpserver it is not necessary. The DJB suite has a special way of working together with tcpserver, the relevant executable (qmail, smtpd, pop3d) and multilog. tcpserver listens for connections to a port (e.g. 25) and kicks off the relevant program (smtpd) as required. It is correct that 21 redirects stderr to stdout but this is actually used (I believe, one of the regular guys can confirm this) as a special pipe for multilog to pipe the output to the multilog log for the service. This is my machines run script for smptd generated by Ushijima's qmail-conf. You'll see that smtpd is called without the background option. It works :-) Cheers Patrick #!/bin/sh exec 21 \ envdir ./env \ sh -c ' case $REMOTENAME in h) H=;; p) H=p;; *) H=H;; esac case $REMOTEINFO in r) R=;; [0-9]*) R=t$REMOTEINFO;; *) R=R;; esac exec \ envuidgid qmaild \ softlimit ${DATALIMIT+-d$DATALIMIT} \ /usr/local/bin/tcpserver \ -vDU$H$R \ ${LOCALNAME+-l$LOCALNAME} \ ${BACKLOG+-b$BACKLOG} \ ${CONCURRENCY+-c$CONCURRENCY} \ -xtcp.cdb \ -- ${IP-0} ${PORT-25} \ /var/qmail/bin/qmail-smtpd ' From: Chris Ochap [EMAIL PROTECTED] = That is not correct, that will just redirect stderr to stdout. You need to put a single at the end of the line that starts up tcpserver to put the process into the background. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: tcpserver blues
Nick (Keith) Fish: Chris Ochap wrote: start() { # Start daemons. echo -n $Starting $prog: daemon /var/qmail/rc /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/qmail echo return $RETVAL } Try adding 21 to the end of the tcpserver line, so: /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd 21 [...] That is not correct, that will just redirect stderr to stdout. You need to put a single at the end of the line that starts up tcpserver to put the process into the background. regards, -- Joerg Lenneis email: [EMAIL PROTECTED]
tcpserver blues
can anyone help me figure out why qmail-smtpd will not start. i have been following multiple peices of literature to complete the install...although they all differ slightly...i have had no trouble with any stage of the install except getting qmail to start listening for remote deliveries. whenever i enter the tcpserver command to start qmail-smtpd whether it be in a startup script or command line...i get tcpserver: status: 0/40 and the prompt just sits there like it is waiting for me to enter another parameter. i am fairly confident that the command line options are all correct: tcpserver executable and switches -v = verbose -p = accept comm w/o remote host dns lookup -x = use rules database location of rules database with a very simple set of rules user and group ids for qmail users...define whether tcpserver is on localhost...use smtp...ok sorry im going over what most of you probably know already. does anyone have any suggestions or need more info? here is a copy of my little script...i am running rh 7.1. thanx all. --- # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that qmail is loaded [ -f /var/qmail/bin/qmail-start ] || exit 0 RETVAL=0 prog=qmail start() { # Start daemons. echo -n $Starting $prog: daemon /var/qmail/rc /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/qmail echo return $RETVAL } stop() { # Stop daemons. echo -n $Stopping $prog: killproc qmail-send RETVAL=$? [ $RETVAL -eq 0 ] rm -f /var/lock/subsys/qmail echo return $RETVAL } restart() { stop start } # See how we were called. case $1 in start) start ;; stop) stop ;; restart) restart ;; *) echo $Usage: $0 {start|stop|restart} exit 1 esac exit $?
Re: tcpserver blues
tcpserver runs in the foreground. that line: tcpserver: status: 0/40 is its [logging] output. when it accepts a new connection, it will output more. just run it in the background. maybe pipe stdout and stderr to a file for logging. or be elegant and use supervise and svscan (see daemontools documentation on cr.yp.to). -tcl. On Thu, 10 May 2001, Chris Ochap wrote: can anyone help me figure out why qmail-smtpd will not start. i have been following multiple peices of literature to complete the install...although they all differ slightly...i have had no trouble with any stage of the install except getting qmail to start listening for remote deliveries. whenever i enter the tcpserver command to start qmail-smtpd whether it be in a startup script or command line...i get tcpserver: status: 0/40 and the prompt just sits there like it is waiting for me to enter another parameter. i am fairly confident that the command line options are all correct: tcpserver executable and switches -v = verbose -p = accept comm w/o remote host dns lookup -x = use rules database location of rules database with a very simple set of rules user and group ids for qmail users...define whether tcpserver is on localhost...use smtp...ok sorry im going over what most of you probably know already. does anyone have any suggestions or need more info? here is a copy of my little script...i am running rh 7.1. thanx all. --- # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that qmail is loaded [ -f /var/qmail/bin/qmail-start ] || exit 0 RETVAL=0 prog=qmail start() { # Start daemons. echo -n $Starting $prog: daemon /var/qmail/rc /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/qmail echo return $RETVAL } stop() { # Stop daemons. echo -n $Stopping $prog: killproc qmail-send RETVAL=$? [ $RETVAL -eq 0 ] rm -f /var/lock/subsys/qmail echo return $RETVAL } restart() { stop start } # See how we were called. case $1 in start) start ;; stop) stop ;; restart) restart ;; *) echo $Usage: $0 {start|stop|restart} exit 1 esac exit $?
Re: tcpserver blues
Chris Ochap wrote: start() { # Start daemons. echo -n $Starting $prog: daemon /var/qmail/rc /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/qmail echo return $RETVAL } Try adding 21 to the end of the tcpserver line, so: /usr/local/bin/tcpserver -v -p -x /etc/tcprules/tcp.smtp.cdb -u 51 -g 50 0 smtp /var/qmail/bin/qmail-smtpd 21 This should cause qmail-smtpd to run in the background instead of directly on whatever tty you are attached to. To test rather it is running or not, tail it the log file it outputs while telnetting into port 25 of your machine. -- Keith Network Engineer Triton Technologies, Inc.