r3 - 20 Dec 2007 - 00:32:21 - RickieKYou are here: ClamAV Wiki >  Main Web  > ClamAndProcmail

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-->

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding ClamAV Wiki? Send feedback