If smtpprox looks interesting to you, check out qpsmtpd. More standards-compliant, more robust for direct exposure to the internet, flexible backends, a plugin architecture for extension that's proven itself with many developers creating new extensions. However, GribUser reports that he finds smtpprox many times faster than the qpsmtpd framework.
That remains my impression; however, I've gotten feedback from someone else that (a) he found deploying qpsmtpd as a postfix-sandwiched content filter tricky, and (b) he found the qpsmtpd maintainers less than helpful in his troubles. So it may be possible that some other solution may be better supported in a traditional postfix content filtering context.
smtpprox is a trivial transparent SMTP proxy, an SMTP server and client combination. It uses its own SMTP server and client modules which are designed to expose every step of the protocol dialogue to the calling program, which provides for the greatest flexibility in hooking in envelope and content controls and scanning.
For efficiency reasons, it pre-forks and serves from a pool of servers, Apache-style.
If you elect to download smtpprox, your use of the software will be governed by the GNU General Public License. smtpprox was written by Bennett Todd, <email@example.com>.
You may also possibly find interesting a trivial patch to add a semaphore around the accept() call, required for some platforms where two children cannot block on accept() at the same time.
Clifton Royston <firstname.lastname@example.org> has written a content filter that adds a disclaimer to a message, based on smtpprox; it's described in this email to the postfix mailing list, or the same patch as a tarball, header_insert.tar.gz.
Maxim Paperno has written spampd to screen spam with SpamAssassin.
Enzo Michelangeli contributed a patch to smtpprox to handle servers requiring SMTP "AUTH LOGIN". The resulting smtpauthprox can be placed between a local MTA that doesn't do AUTH LOGIN, an an ISP's MTA that requires it. The email message accompanying it is available, as are diffs against smtpprox.
Akihiro Kayama contributed a patch adding XFORWARD support to smtpprox.
Brian DeRosa contributed a customization of smtpprox to reject senders blacklisted in a MySQL database.
Jonathan Hitchcock contributed a patch to provide a named file, for content scanners that require one, and a content scanner based on smtpprox to filter messages with clamav and spamassassin.