On Saturday 31 October 2009, Yet Another Ninja wrote: >On 10/31/2009 2:33 PM, Gene Heskett wrote: >> On Saturday 31 October 2009, Yet Another Ninja wrote: >>> On 10/31/2009 2:16 PM, Gene Heskett wrote: >>>> Greetings; >>>> >>>> Does anyone have a procmail recipe that incorporates clamav into the >>>> checks, and one that handles the clamav output to /dev/null the viri >>>> etc? >>>> >>>> At least I assume clamav doesn't auto-delete, I've not yet studied all >>>> the docs, but do have freshclam running apparently ok. >>> >>> this works for me: >>> :0cW >>> : >>> |clamdscan --no-summary --stdout - >>> >>> CLAMAV_CODE=$? >>> >>> :0 >>> >>> * CLAMAV_CODE ?? 1 >>> /dev/null >> >> This looks like what I had in mind. But since I don't have that part >> checked out yet, would it then delete the mail because clamdscan had an >> error? I'll enable the second after the first is working. :) > >it will only delete the msg if clamdscan returns code 1 >if it errors out, it won't return code 1 > >running only the first part will only show it did something if you >enable procmail logging
It is enabled, and a tail shows this: procmail: Executing "clamdscan,--no-summary,--stdout,-" procmail: Non-zero exitcode (2) from "clamdscan" procmail: Assigning "LASTFOLDER=clamdscan --no-summary --stdout -" procmail: Assigning "CLAMAV_CODE=2" for every msg so far. Now I need to grok what the error is. It may be that I need to tell clamdscan who it is running as since its is not running as the user clamav. Thanks -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) The NRA is offering FREE Associate memberships to anyone who wants them. <https://www.nrahq.org/nrabonus/accept-membership.asp> The F-15 Eagle: If it's up, we'll shoot it down. If it's down, we'll blow it up. -- A McDonnel-Douglas ad from a few years ago