>If you have problems with inetd spawning too many processes, either patch
>inetd do support counting and limiting the number of active processes per
>socket, or use something like tcpserver which already has this code
>built-in, or change the process in question to be its own daemon and
>implement counting and limiting yourself. The first option actually is the
>most difficult, assuming nobody has done this yet.
It's been done in xinetd. Here's a sample of my xinetd config file which
shows how I'm limiting the system to 20 instances of smtp on an interface.
I strongly recommend xinetd as it can solve many of these problems. It's
better to solve them in user-land than in the kernel.
service smtp
{
id = smtp-normal
socket_type = stream
protocol = tcp
wait = no
user = qmaild
server = /usr/local/sbin/tcpd/tcp-env
server_args = /usr/sbin/qmail-smtpd
nice = 5
instances = 20
passenv =
interface = 203.29.19.1
}
service smtp
{
id = smtp-relay
socket_type = stream
protocol = tcp
wait = no
user = qmaild
server = /usr/local/sbin/tcpd/tcp-env
server_args = /usr/sbin/qmail-smtpd
nice = 5
instances = 20
passenv = RELAYCLIENT
interface = 10.10.10.8
}
-- ----------------------------------------------------------- In return for "mailbag contention" errors from buggy Exchange servers I'll set my mail server to refuse mail from your domain. The same response applies when a message to a postmaster account bounces. "Russell Coker - mailing lists account" <bofh@snoopy.virtual.net.au> -----------------------------------------------------------