General discussion
August 27, 2002 at 12:37 PM
rouse

Piping prog output to procmail/Sendmail

by rouse . Updated 24 years ago

I am fooling around with an autoresponder recipe using procmail & sendmail (linux). Is it possible to add the output of a linux app called ‘fortune’ to my autoreply? Currently my ar recipe echos a few text lines & then appends a text file called .signature. Here is what I’ve got:
:0 Whc: me.lock
* $^To:.*me
* !^FROM_DAEMON
* !^X-Loop: me@isp.net
| formail -rD 8192 me.cache
:0 ehc # if the name was not in the cache
| (formail -rI”Precedence: junk” \
-I”From: AutoResponder ” ; \
-A”X-Loop: me@isp.net ” ; \
echo “I received your mail,”; \
echo “Thanks very much.”; \
echo “– “; \
cat $HOME/.signature \
) | $SENDMAIL -oi -t
This works fine, but I can’t figure the syntax for piping program output into above.
Thanks in advance.
Keith

This discussion is locked

All Comments