Tech Journal Back to Tech Journal

qmail keeps refusing e-mails, saying: "not in my list of allowed rcpthosts"!

"not in my list of allowed rcpthosts" is a Qmail error that sez it won't relay to any host not in the list. It reads the list from /var/qmail/control/rcpthosts one-recipient-domain-per-line.

You can use the environment variable "RELAYCLIENT" to specify IP addresses of hosts from which you can send mail in a totally open relaying manner. If you give it an empty value, the server will become an open relay. The program tcp-env can supposedly do this for you on a per-session basis, but I haven't figured out a way.

Here's how I call qmail via xinetd (this is the contents of the file /etc/xinetd.d/smtp):

service smtp
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = qmaild
        server          =  /var/qmail/bin/tcp-env
        server_args     =  /var/qmail/bin/qmail-smtpd
        # this is a simple hack to force the server to be an open-relay.
        # I guess this should be done via tcp-env, but otherwise I should
        # set the env's value to be a list of the allowed clients
        env             = RELAYCLIENT=192.168.1.3
        log_on_failure  += USERID
        disable         = no
}
Last updated on 2004-02-07 14:00:00 -0700, by Shalom Craimer

Back to Tech Journal