.TH relay-ctrl-allow 8
.SH NAME
relay-ctrl-allow \- selectively enable SMTP relaying
.SH SYNOPSIS
.B relay-ctrl-allow
.I command
[
.I arguments ...
]
.SH DESCRIPTION
.B relay-ctrl-allow
looks up the client's IP address from
.I $TCPREMOTEIP
and adds it to the directory specified by either
.I $RELAY_CTRL_DIR_FD
(set by
.BR relay-ctrl-chdir )
or
.I $RELAY_CTRL_DIR
if the client was authenticated by the server program.
It writes the value of the
.I $USER
and
.I $DOMAIN
variables into that file, if they are set, so that
.B relay-ctrl-check
can export them back into the environment.
It then executes the command named on the command line.
.P
If
.I $AUTHUSER
and
.I $AUTHARGV0
are set, the invoker is determined to be either Courier IMAP or
Courier POP3, and
.B relay-ctrl-allow
checks the environment for
.I $AUTHENTICATED
to determine if authentication succeeded.
Otherwise, the invoker is determined to be either
.B qmail-popup
or
.B pop3front-auth
(or similar) and authentication has succeeded.
.SH "RETURN VALUES"
Returns 111 (temporary failure) if any operation fails; otherwise the
exit value is that of the executed program.
.SH "SEE ALSO"
relay-ctrl-age(8),
relay-ctrl-check(8),
qmail-pop3d(8),
qmail-popup(8),
tcpserver(1),
tcp-environ(5)
.SH NOTES
If
.I $RELAY_CTRL_DIR_FD
is set, the IP files are created with permissions set to world
writeable so that they may be overwritten.