SMTPD(8)

NAME
smtpd - SMTP proxy (client portion)

SYNOPSIS
smtpd [-daemon port] [-fastdaemon port] [-as tag]

DESCRIPTION
The Firewall Toolkit smtpd proxy is an application level proxy that provides configurable access control and logging mechanisms. The smtpd client proxy together with the smtpfwdd server proxy, which run on the firewall, transfer mail between internal and external mail servers, using rules you supply.

All packets, and therefore all application requests go to the firewall. On the firewall, the smtpd and smtpfwdd proxy software relay information from one side of the firewall to the other. They prevent versions of sendmail on the external network from talking with versions of sendmail on the internal network, and vice versa. No IP packets pass from one side of the firewall to the other. All data is passed at the application level.

The client portion of the SMTP proxy (smtpd) generally runs as a daemon (invoked from /etc/rc.local) and listens for requests on the standard SMTP port (25, as indicated in /etc/services). Whenever the system receives an SMTP request on this port, the smtpd client collects the mail from the sender, logs the message, and places the mail in a temporary directory. Periodically, based on a configurable value (by default every 60 seconds), the server daemon (smtpfwdd) wakes up and checks to see if there is any new mail. The smtpfwdd daemon checks the headers of the mail for formatting problems. It then calls the configured message transfer agent (usually ssmtp ) for final delivery.

OPTIONS

  Command Line Options
The smtpd proxy recognizes the following command line options (whether started from the command line or from within /etc/rc.local):

-daemon port
    Indicates that the smtpd proxy runs as a daemon, and the port (name or number) on which the smtpd proxy listens. When -daemon option is used, configuration is being read from netperm-table for every new connection accepted by proxy.

    port Specifies either a numeric id or symbolic name from the /etc/services file.

-fastdaemon port
    Indicates that the smtpd proxy runs as a daemon, and the port (name or number) on which the smtpd proxy listens. When -fastdaemon option is used, configuration is being read from netperm-table once the daemon starts or if SIGHUP is received.

-as tag
    Changes default application tag for netperm-table from "smtpd" to any given string.

  Configuration Options
The smtpd proxy reads configuration rules from the /usr/local/etc/netperm-table. It reads all rules using the smtpd , smap and * (wildcard) keywords. The smtpd proxy reads the netperm-table from top to bottom. If there are multiple rules in the table that could apply for a particular attribute, the smtpd proxy uses the first one that it finds. See netperm-table(5) for a more complete explanation of netperm-table syntax and precedence. smap configuration options are included for TIS fwtk compatibility.

The smtpd proxy recognizes the following attributes:

directory directory
    Specifies the directory that the smtpd proxy makes its root directory before providing service. This is also the directory where the smtpd proxy stores incoming messages.

hosts host-pattern [host-pattern...] [options]
    rules specify host and access permissions. Typically, a hosts rule will be in the form of:

    smtpd: deny-hosts unknown

    smtpd: hosts 192.33.112.* 192.94.214.*

    There may be several host patterns following the "hosts" keyword, ending with the first optional parameter beginning with '-'. Optional parameters permit the selective enabling or disabling of logging information, etc. Sub-options are:

    -log Increases log verbosity

    [-client]-dscp dscp-tag-name
    [-client]-dscp dscp-hex-value specifies diffserv codepoint (QoS/ToS mark) for client to proxy connection.

groupid group
    Specifies the name of the group the smtpd proxy uses when running.

    group
        Specifies either a name or numeric id from the /etc/group file.

maxbytes number
    Specifies max email size.

maxheaderline number
    Specifes max single header line length. 998 is default as recommended by rfc2822.

maxrecip number
    Specifies maximal number of receipients per SMTP session.

timeout seconds
    Specifies the number of seconds the smtpd proxy is idle (with no network activity) before disconnecting

userid user
    Specifies the user ID the proxy uses when running.

    user
        Specifies either a name or numeric id from the /etc/passwd file.

EXAMPLES
This example indicates that the smtpd and smtpfwdd proxies use the directory /var/spool/smtpd as their root directories:

    smtpd:	permit-hosts 10.0.0.* outerrelay.illuminati.int
    smtpd, smtpfwdd:    directory       /var/spool/smtpd

FILES

/etc/rc.local
    Command script that controls automatic reboot, and includes startup information for the smtpd proxy.

/usr/local/etc/netperm-table
    The network permissions file contains configuration information for the Firewall Toolkit, including the smtpd proxy.

/var/spool/smtpd
    The directory that the smtpd proxy uses as its root directory.

BUGS
There is no advanced relay control. We accept everything from allowed hosts so relays should be properly configured to prevent unauthorized relaying.

smtpd does not do ESMTP. You may consider that as feature as well.

Report bugs to arkenoi@gmail.com or fwtk-users@buoy.com mailing list. Include a complete example, explaining what you expected to happen and what actually happened. Be sure to indicate the type of system (operating system, hardware, etc.) you are using, as well as the version of the smtpd proxy.

AUTHOR
Obtuse Systems Corporation.

SEE ALSO
netperm-table(5), rc(8), smtpd(8)