Obtuse smtpd/smtpfwdd
This is the Obtuse smtpd/smtpfwdd SMTP store and forward proxy. It can be used to pass SMTP mail across a dual-homed bastion host (such as in a firewall) with minimal danger. It can also be used if you simply don't want your big complicated mail agent (such as sendmail) establishing direct contact with the outside world. It is useful for people who wish to practice "Safe Sendmail" :-)
These programs are documented at http://www.obtuse.com/juniper-docs/ Please consult the web site for the man pages.
http://www.obtuse.com/smtpd.html is a top level page for smtpd that should get you started.
smtpd implements a minimal subset of the Simple Mail Transfer Protocol as specified in RFC 821. This daemon is used to talk to other smtp mailers on the internet so that the host may recieve mail. This is the storing daemon. smtpd agressively checks the originating host and logs anything it knows about it. it also imposes the RFC mandated limits on the length of command lines, and checks the hostnames and mailnames given by the remote client for anything suspicious. smtpd now checks the message headers for unprintable characters, or excessively long (>255) lines. It can (at your option) drop the connection on seeing anything suspicious. smtpd runs as a non-privileged user inside a chroot to it's spooling directory.
smtpfwdd is the forwarding daemon. It scans the directory used by smtpd for completed mail messages. Upon seeing one, it forwards it to it's intended destination by using sendmail or a similar mailer. You may at your option, tell smtpfwdd to use a wrapper for sendmail which checks the message body for anything you don't like instead of the real thing. That is currently the best way to impose additional checking on the content of a mail message. You may use any mailer to forward mail that takes arguments of the form:
mailer -f fromaddr toaddr toaddr1 toaddr2 .... smtpfwdd also runs as a non-privileged user.
For installation notes please see the file INSTALL. The default Makefile (also in Makefile.default) builds the daemon with all features enabled. Makefile.nochecks can be used to build the daemon with no address checking (nothing from address_check.c) enabled, and Makefile.minimal can be used to build a minimal daemon that won't even do reverse dns lookups.
