SMTP.PROXY(1)

NAME
smtp.proxy - SMTP proxy server

SYNOPSIS
smtp.proxy [options] [server]

DESCRIPTION
smtp.proxy is a proxy server for the SMTP protocol. It forwards traffic between a client and a server watching that the client fullfills the protocol specification.

smtp.proxy is usually started from a TCP superserver like inetd(1) or tcpproxy(1). It can be used from the command line to but does not support binding to a service port like sendmail(1).

server can be either an SMTP server on a different machine which is then contacted via TCP/IP or a local sendmail binary. If server is omitted the latter is assumed with sendmail in /usr/sbin.

  Protocol Support
smtp.proxy supports the following SMTP commands:

    HELO, EHLO
    [MAIL|SEND|SOML|SAML] FROM, RCPT TO, DATA,
    NOOP, RSET, HELP, ETRN, QUIT

Unsupported SMTP commands result in a syslog message without forwarding the command to the server. ETRN is only supported if the -e option is given on the command line.

Email addresses are checked againt some simple tests:

    - they must be enclosed in angle brackets `<', `>',
    - they must contain exactly one `@',
    - they must not contain a `%' or a `!',
    - `:' and `,' characters are also not allowed.

While these checks block some valid email addresses they are almost what you want these days in an Internet with DNS.
The special envelope address `<>' is always allowed.

OPTIONS
The following options are available:

-e  enable proxying of the ETRN command.

-d  switch to debug mode: the dialog between server and client is written to stderr.

-l dir
    if set smtp.proxy looks if the file clientip exists in the directory dir and if it's not older than 600 seconds. If so the client is accepted otherwise not.

-q  remove the mailpath from the received mail. Specifing -q twice supresses also the proxy's own `received from' line.

-r rcptlist
    specify a comma separated list of valid receipients. If this option is set smtp.proxy checks each receipient from the RCPT command against the patterns (use `*' and `?' as wildcards) from that list and rejects it if it doesn't match any pattern without forwarding the request to the server.
    If a pattern from rcptlist starts with an `@'-sign only the domain part of the email address is matched against it, not the whole email address.

-s senderlist
    the same as the above rcptlist but for senders in the MAIL command.

-t timeout
    specify a different SMTP timeout in seconds than the default of 300 (5 minutes).

NOTES
If your running smtp.proxy with a local sendmail make sure the user running the proxy is on the Tuser list in sendmail.cf. Otherwise you'll get authentication warnings in your syslog and the emails.

SEE ALSO
inetd(1), sendmail(1), tcpproxy(1).