procmail
[Top] [All Lists]

problem with environment variable which is lost

1997-10-07 06:30:58
Still going on with my experiments...

My procmail script ends with

...

:0 c:
* (^TO|^From.*)johnny
johnny-folder
  :0A
  { FOUND="$FOUND johnny" }

:0:
|rm -f headers.tmp;echo "From:" $FROM >> headers.tmp;echo "To:" $TO >> 
headers.tmp;echo "Cc:" $CC >> headers.tmp;echo "Found:" $FOUND >> 
headers.tmp;RESULT=`myfilter headers.tmp`;echo $RESULT >> result.list1

# If RESULT is non empty, put the message in `my-default' folder
:0:
#* RESULT ?? [^         ]
|echo $RESULT >> result.list2
my-default

Now, the problem is that I loose the value of RESULT, as is confirmed
by the two files result.list1 and result.list2. The first contains non empty
lines (actually some filtering function performed by the `myfilter' program)
and the second contains only empty lines.

What am I doing wrong ? Besides, are there other stupid/dangerous
things in what I wrote above ?

Thanks,

Denis Roegel

<Prev in Thread] Current Thread [Next in Thread>