Tcpserver
From Qmail Info Wiki
tcpserver is a program which listens to a TCP socket, and when a connection is detected, runs another program with the incoming socket connected to the "standard in" and "standard out" filehandles. This allows software authors to write programs to provide network services without having to write code to handle the low-level details of working with sockets.
tcpserver is part of the ucspi-tcp package, written by Dr. Daniel J. Bernstein, the author of qmail.
tcpserver can be configured to use an access control file, created by the tcprules program, with specific directions on which IP addresses to allow and deny connections from. For connections which it accepts, it can also set or change environment variables which are visible to the client program that it runs. For example, it could set the RELAYCLIENT variable to tell qmail-smtpd that this connection is from a "trusted" IP address, and should not be subject to the normal anti-relaying rules.
There have been a few patches which try to add SSL functionality to tcpserver. However, the best idea so far is the sslserver program, which functions in a similar manner to tcpserver but handles SSL connections instead of normal non-encrypted connections.
Links
Home page for the ucspi-tcp package (http://cr.yp.to/ucspi-tcp.html)
Home page for the tcpserver program (http://cr.yp.to/ucspi-tcp/tcpserver.html)

