Re: tcpserver won't start smtp]

Subject: Re: tcpserver won't start smtp]
From: Paul Schinder (
Date: Wed Jan 26 2000 - 06:35:47 MST

At 7:14 AM -0500 1/26/00, Patrick Callahan wrote:
>I'm sure this is some dumb user configuration error or typo.

Hard to see what though, since you've found Dave Sill's "Life with
qmail", unless you've forgotten to make one of qmail's users or
groups. My own machine lives close to the bleeding edge, but my
wife's machine is stock YDL CS 1.1, and qmail and tcpserver (and
daemontools etc.) are running fine there.

>QMAILDUID=`id -u qmaild`
>NOFILESGID=`id -g qmaild`
>exec /usr/local/bin/softlimit -m 2000000 \
> /usr/local/bin/tcpserver -v -p -x /etc/tcp.smtp.cdb \
> -u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd

OK, that looks right, so long as QMAILDUID and NOFILESGID are
defined. A common mistake is to have something missing so that it's
not looking up a service named "smtp" but one named, say,
"/var/qmail/bin/qmail-smtpd". So long as you're using Dave Sill's
stuff, you can't go wrong so far as syntax is concerned. You might
want to make sure that the two "id" commands give the right result
(or *a* result) by running the above once by hand.

What does

#include <netdb.h>
#include <stdio.h>
main () {
     struct servent *i;
     i = getservbyname("smtp","tcp");
     printf ("%d\n",i->s_port);

give? (Or actually, even better

#!/usr/bin/perl -w
print +(getservbyname("smtp","tcp"))[2],"\n";

since it will use the same call and won't need to be compiled.) Of
course, both give "25" on my machines.

Paul Schinder

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