-----BEGIN PGP SIGNED MESSAGE-----
On Wed, 22 May 1996, Das Devaraj wrote:
On Wed, 22 May 1996, Guy Geens wrote:
Let's give it a try: change the second recipe to:
:0 b
| { cat ./$HEADERFILE ; \
echo "User $FROM\nOn $DATE\nsent a message to me.\n"\
"Please process and reply to $TO\n" \
"The message received is given below\n" \
"-------------------------------------\n" ; \
cat - } | formail ... | $SENDMAIL -oi -t
Thanks for your response. After :0 b, isn't the body of
the email on stdout (or stdin, depending on how you want to
look at it). If that is true, after the the first `cat` it
is lost and the last `cat` would be expecting an input from
stdin. Since procmail execution is not tied to any terminal,
that might cause an error/automatic EOF(?)
procmail runs sh to execute all the commands. sh gets the body of the
message as stdin. sh then runs all the commands in the braces one after
the other, and sends the output to formail. All of the commands get the
same stdin (i.e., the message body). The first cat and echo don't use
stdin, so the message body is passed through to the second cat. This one
passes the body to formail.
If there was another command between the braces after the last cat, that
command would have no stdin.
- --
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D.
student at ELIS -- TFCG / IMEC
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use
keyserver)
"We've got to do what the liqour people did during prohibition -
dispel the cloud of illegality and danger. Psychedelic drugs must
be associated with beauty, glamour, sexuality. We need symbols of
personal freedom, High fashion. Graceful hedonism compared to
sloppy boozers."
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: pgp fingerprints in message headers
iQBVAwUBMaQQO3wHoCha5QR1AQEvOgIAmkM24BbBuztiZhaYY5/dJCX9ziSdRq1h
1At+onO5n2NfjJ5SHpe9Wo+fp6mH7Ia+fOKhIc3QrB0Yg/NxY/r3zw==
=3nLP
-----END PGP SIGNATURE-----