Mario Salazar Baños wrote:
I use qmail with rblsmtpd and relay-ctrl , one month ago I activate
rblsmtpd and now my users outside from my network are rejected, is
possible that relay-ctrl conditioned to rblsmtpd?, ie, if relay-ctrl is
valid then don't use rblsmtpd?
If you have to use the same SMTP port for both incoming mail and
relaying, then you need to make sure nothing gets in the way when
RELAYCLIENT is set. I use a script called "ifrelayclient" which runs the
first command only if RELAYCLIENT is set, running the remaining commands
regardless. (It expects the first command to end with --.) So you could
put the following in your qmail-smtpd run script after relay-ctrl-check
and before rblsmtpd:
/path/to/ifrelayclient /usr/bin/env RBLSMTPD='' --
I also set GREETDELAY='' because my qmail-smtpd is wrapped by greetdelay
as well. qgreylist already DTRT when RELAYCLIENT is set.
Here's ifrelayclient (substitute paths to @PROGRAM@ for your system):
#!@SH@
#
# Wrapper for qmail-smtpd command chain that runs the first command
# only if RELAYCLIENT is set, running the remaining commands
# regardless. End the first command with "--".
#
# Useful for e.g. setting RBLSMTPD="" to avoid RBL-blocking an
# authenticated user.
relayclient_isset()
{
@SETENV@ | @GREP@ -q '^RELAYCLIENT=' >/dev/null 2>&1
}
main()
{
local cmd1 arg
cmd1=""
while [ $# -gt 0 ]; do
arg="$1"; shift
if [ "${arg}" = '--' ]; then
break
else
cmd1="${cmd1} ${arg}"
fi
done
if [ $# -eq 0 ]; then
@ECHO@ >&2 "usage: $0 command args -- command args"
exit 111
fi
if relayclient_isset; then
exec ${cmd1} "$@"
else
exec "$@"
fi
}
main "$@"
exit $?
|