procmail
[Top] [All Lists]

procmail: piping into variables

1996-09-20 04:31:51
Hello,

I want to generate a reply including a syntax checked version of the
received message body. This is what I tried (this is for testing only;
$test ist a folder with all the received mails in it; acheck ist a program
which will produce a a syntax check of the message body and eat the
message header, so that I cannot use "formail -r ... -s acheck -l"): 

:0
* ^Subject: ATLANTIS TEST TEST TEST
* !^FROM_DAEMON
{
 :0 c:
  | cat >> $test; echo "\n\nNEXT\n\n" >> $test

 :0 c
  $message=|

 :0 
  | (echo $message |\
     formail -r -A "Precedence: junk"\
                -A "X-Loop: alex(_at_)zool(_dot_)unizh(_dot_)ch");\
    (echo $message | acheck -l)\
    | $SENDMAIL -t

}

$message seems never to be set to the entire mail! I have tried only 
'message=|' but that just prints the mail to stdout. When I set the last 
recipy to "| echo $message > $test.more" I can check what $message 
contained. It was empty. $message does not appear anywhere else in my 
.procmailrc file. 

Is there a better way to achieve the desired effect? If not, how can I 
get the mail stored in $message?

I am using
procmail v3.10 1994/10/31 written and created by Stephen R. van den Berg

Alex.

-- 
Grobbl. Noggl ARGH! ARGH! Gabbl. Nagga Frk'Tkl Kpfzt. 
alex(_at_)zool(_dot_)unizh(_dot_)ch(_dot_)
Znamifktzgck. A. Schroeder, Buelachstr. 1c, CH-8057 Zuerich, Switzerland.

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