procmail
[Top] [All Lists]

Re: autobounce: I ALMOST got it

1997-06-17 06:01:00
At 08:45 AM 6/16/97 -0500, W. Wesley Groleau x4923 wrote:

  :0 c
  TEMP=|cat 

What does this do?

Well, since no expert answered, the newbie will :-)  Then the experts
can tell us what I got wrong :-) :-)

cat with no filename uses stdin as the input "file"--in this case, the
incoming message.   =| puts the output of that (again the whole
message) as a new string value for the environment variable TEMP.  In
Korn shell, this would be 'TEMP="$(cat)"  So later, I can say  'echo
$TEMP' to output the message to something else.

Actually, I think it will put the message into a file called 'TEMP=|cat'.

I think to get the mentioned behavior, you would need:
        :0
        { TEMP=|cat }

(where the "c" flag is not needed since this is a non-delivering recipe).

Awaiting corrections now...  :-)

Cheers,
Stan

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