help requested: procmail receipes

Hello all. I want some help procmail receipe. I tried to get some mails' sender and receiptient. Then tried to send them a bash script. But it didnot work. I try a lot of variation of the below receipe. Could anyone can help what is wrong on my receipe? Or if the recepie is correct what can be wrong? Thanks...

:0 fhw

  • To.*user@domain.com
    FROM=`formail -xFrom:`
    TO=`formail -xTo:`
    | script $TO $FROM