Qmail is a fast, secure and efficient SMTP agent. Qmail is designed to replace the Sendmail system on Unix systems.

These days, I use Postfix as my mailserver/MTA of choice, but this page is here in case it’s of use to someone.

Release 7.0 onwards of Redhat Linux and all versions of Fedora use xinetd instead of the older inetd to control internet servers, such as telnet, finger and mail servers.

There are certainly many other distros that are using xinetd, so this will apply to those too.

D.J Bernstein, who programmed Qmail recommends his own tcpserver package when running Qmail.

If you for some reason you don’t want to use tcpserver, here is the configuration information you’ll need to run Qmail under xinetd.

Note that a more robust and complete way to do this can be found on the Openwall wiki. I’m leaving my approach here, as it’s referenced from elsewhere.

Create a file called smtp in the relevant directory (/etc/xinetd.d/ on a Redhat/Fedora system) and copy the following info into the file:

service smtp
{
    disable = no
    flags           = REUSE NAMEINARGS
    socket_type     = stream
    protocol        = tcp
    wait            = no
    user            = qmaild
    server          = /usr/sbin/tcpd
    server_args     = /var/qmail/bin/tcp-env -R /var/qmail/bin/qmail-smtpd
}

You’ll probably need to restart the xinetd server:

killall -USR2 xinetd

Note that xinetd needs the USR2 signal, not a HUP signal to force it to reread all of its configuration information.