On Wed, Apr 14, 2004 at 08:34:27AM -0500, someone wrote me privately:
You posted this, and it can't be right. It has two actions for one
recipe:
And of course said someone is right. I copied and pasted from my
test harness without bothering to look very hard to see what I
might have been playing with at the last go-round with it.
Let's try again, shall we?
:0 # look for possible viral transporters before calling clamscan
* 9876543210^0 ^Content-Type:.*(attachment|multipart)
* 9876543210^0 ^FROM_MAILER
{
:0
SC_OUT=| clamscan --mbox --disable-summary --stdout -
CS_EXIT = $?
:0: # look for any clamscan problems ( exit code > 1 )
* -1^0
* $ $CS_EXIT^0
clamscan_problem
MATCH
:0 D # capture right side of var; isolate name of any virus
* SC_OUT ?? : \/.*
* MATCH ?? ^^\/.* FOUND^^
* MATCH ?? ^^\/.* ()
* MATCH ?? ^^\/.*[^ ]
{ LOG = "$NL ClamScan identified $MATCH $NL" }
:0 fw # attach an X-header telling us what matched
| formail -I "X-Clamscan: $MATCH"
:0:
* ! MATCH ?? ^^OK^^
CLAMSCAN_POZZIES
}
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail