Policy Filter for ClamSMTP (pf-clamsmtp)
pf-clamsmtp is a perl-written policy filter for use with Postfix and clamsmtp primarily written for one purpose: pass messages to the clamsmtp virus filter only if they don’t exceed a given size.
The reason for doing so was simple: traditional tools like MailScanner or AMaViS put to much of a burden on systems when simple virus filtering is desired. Also it doesn’t make sense to scan today’s huge megabyte-sized messages: first, most mail viruses rarely exceed a few kilobytes in size, second, scanning huge messages has a big payload and may expose a system to certain race conditions (eg. out of memory, disk space, etc).
pf-clamsmtp is based on a sample policy daemon included with Postfix and developped to work together with ClamSMTP. Sample configurations are included with the release tarball. pf-clamsmtp is released under the terms of the GNU GPL, version 2.
Any feedback is appreciated.