clamfilter 0.5 -------------- This is a small, efficient clamav content filter for Postfix. What is does is just a content filtering of messages passing via Postfix MTA thru clamav. This version will fork and run clamdscan binary. Next version will connect to clamd directly via libclamav. Clamfilter was designed to be the only content filter in Postfix installation, and this is why this software appeared. All other content filters for Postfix are designed to be flexible; clamfilter is not. It is just designed to perform a single task - filtering thru clamav. If you need to add spam filtering as well, take a look at the "spamdeliver" package. clamfilter requires clamd running. Well, honestly, it's not a requirement, as current version simply runs an external binary. This can be "clamdscan" as it is default or you can compile it with "clamscan" as a binary to run. In case that clamd is not running and clamfilter executes the clamdscan binary, the message is passed thru as if it is not infected at all. When a virus is found, a small notification is sent to the receipent of the virus. You can modify one directly in the source code. If you need to disable it - go into source and disable the deliver_warning function. :) And, of course, whatever you need to change like location of sendmail and clamdscan binaries - are highly ;) configurable in the source code. Compiling & installation ------------------------ 1. make make test make install 2. Edit Postfix's master.cf and put there a couple of lines like this: filter unix - n n - - pipe flags=R user=mail argv=/usr/bin/clamfilter -F admin@domain.com -f ${sender} -- ${recipient} You can replace "admin@domain.com" by your email or any email which will be used by clamfilter as an originating email in virus warning messages, sent by clamfilter to message receipent in case a virus was found. 3. In the same file, find the smtp entry. This is a line, beginning with "smtp", it will look like that: smtp inet n - n - - smtpd add the content_filter option to smtpd binary: smtp inet n - n - - smtpd -o content_filter=filter:dummy 4. Restart Postfix. Debug ----- If you call clamfilter with -D option, it will carefully log it's movements to syslog as mail.debug fascility. License ------- GPL, of course. Credits ------- Program maintainer: Egor Egorov . Code touched by Andrey Khavruchenko Oleg Marchuk URL: http://www.ensita.net/products/clamfilter/ $Id: README,v 1.2 2004/12/02 18:31:03 egor Exp $