"Johan Van Gompel" <[EMAIL PROTECTED]> writes:
| I mean the latter. When I add e.g. 'hotmail.com' to rcpthosts, everyone
| inside the LAN is able to send messages to that host. If I don't, they get
| that darn 'not found in rcpthosts' message.

Let's try a simple test.  Our goal is to verify that network
connections from your client systems are being recognized and flagged
by tcpserver with the RELAYCLIENT environment variable, which
authorizes them to use the full power of SMTP.

So, the idea is that we'll run a program that connects from localhost
(127.0.0.1, which I assume you have in your smtp.cdb file) and uses
the same rules as your qmail-smtpd invocation, but that just prints the
environment.  When it does, check to see that RELAYCLIENT is there.

Edit the PATH and RULES lines below, as necessary.

#!/bin/sh
# --- tcprules exerciser

# Customize PATH for your site:
PATH=/usr/local/bin:/usr/bin:/bin

# Customize RULES for your site:
RULES=/var/qmail/rules/smtp.cdb

# Launch tcpserver asynchronously, letting it choose the port number.
# Use env to make sure it starts with a pristine environment, and 
# have it run env to report the environment that it sets.

port=/tmp/port.$$
env - PATH="$PATH" \
        tcpserver -R -1 -x "$RULES" 0 0 env >"$port" &
pid=$!

# Read what env reports about tcpserver's environment.
tcpcat 0 `cat "$port"`

# Cleanup.
rm "$port"
kill "$pid"

# My output looks like this.  Notice that RELAYCLIENT has been set
# to "", as expected.
#
# PATH=/usr/local/bin:/usr/bin:/bin
# PROTO=TCP
# TCPLOCALPORT=42845
# TCPREMOTEIP=127.0.0.1
# TCPLOCALIP=127.0.0.1
# TCPREMOTEPORT=42846
# TCPLOCALHOST=localhost
# TCPREMOTEHOST=localhost
# RELAYCLIENT=

Reply via email to