ProcMail?
Steven Boger's simple interface to clamdscan
Using clamdscan directly from /etc/procmailrc without a special tool like amavis:
#######################################
# /etc/procmailrc 11/25/2005 Steven S. Boger
# Scan all incoming mail, add the virus name to the subject if
# one is found. make sure you have ScanMail, ScanArchive
# added to your clamd.conf
:0
VIRUS=| clamdscan --no-summary --stdout - | cut -d' ' -f2 -
:0
* VIRUS ?? !^OK
{
:0
SUBJECT=| egrep '^Subject:' - | sed -e 's/Subject: //' -
:0 fw
| formail -i"Subject: [VIRUS: ${VIRUS}] ${SUBJECT}"
}
#######################################
--
LucaGibelli - 14 Nov 2006
I use this in my /etc/procmailrc (combined clamav/SpamAssassin check, remove spamc if you don't use it):
DROPPRIVS=yes
:0cW
|clamdscan --no-summary --stdout -
CLAMAV_CODE=$?
:0
* CLAMAV_CODE ?? 1
/dev/null
:0fhw
|spamc
:0:
* ^X-Spam-Status: Yes
$HOME/spam
--
RickieK - 20 Dec 2007
SoftlabsAV? mail filter using clamscan
A complete procmail-based solution that identifies viruses, phishings and possible phishings using clamscan in addition to its own mechanisms is
SoftlabsAV?, available at
http://softlabsav.softlabs.net/
</center-->