I found this while digging in the archives for hints on how to set up Clamav. I have been testing it for a few days now with no problems

# Scan for viruses
:0w
VIRUS=|/usr/local/bin/clamdscan --mbox --disable-summary --stdout  -

:0hfw
* VIRUS ?? ^.*: \/.* FOUND
| formail -A "X-Virus-Status: Yes, $MATCH"

:0Ehfw
| formail -A "X-Virus-Status: No"

# Move Positives to quarantine
:0:
* ^X-Virus-Status: Yes
/home/ed/mail/quarantine


At 7:49pm +0000 3/7/04, Matthew Cline wrote:

For those of you who are using SA with procmail, and also want to do virus
filtering, you can install/config ClamAV (http://www.clamav.net/), then add
these lines to your procmailrc file:

    :0wc
    | clamdscan -

    :0efw
    | formail -b -f -t -I "X-Clamav-status: yes"

This will add "X-Clamav-status: yes" to anything message that is found to have
a virus, of causes clamdscan to generate an error.  Someone who's better at
procmail than I could change the ":0efw" rule so that it only goes into
effect if the return code of "clamdscan" is 1 (0 = no virus, 1 = virus, 2 =
error).

Ed Kasky

Randomly Generated Quote:
"Who is rich? He that is content. Who is that? Nobody."
   --Benjamin Franklin

Reply via email to