But I would like to send back the headers (and may be the body) of the
original message. How could I do it in procmail?
Here is the current setup:
# Echo service
:0:/tmp/echo.procmail.lock
* ^To: *echo
* !^FROM_DAEMON
* !^X-Loop: echo(_at_)my(_dot_)domain
| (formail -rt -A"Precedence: junk" \
-A"X-URL: http://www.my.domain/" \
-A"From: postmaster (Echo service)" \
-A"X-Loop: echo(_at_)my(_dot_)domain" ; \
echo "Message received."; \
echo "A small ad"; \
echo "http://www.my.domain/") | $SENDMAIL -t
-r Generate an auto-reply header. This will normally
throw away all the existing fields (except X-Loop:) in
the original message, fields you wish to preserve need
to be named using the -i option. If you use this
option in conjunction with -k, you can prevent the body
from being `escaped' by also specifying -b.
I think the man page quote from formail above pretty much sums it up.
for sending back the body, also see the -k flag for formail.
Having the header quoted as part of the body of your reply might be
a little tougher. One way to do it would be to use variables to
store elements of the header with formail -x.
HEADER=`formail -X Subject: -X From: -X To: -X Date: -X Sender .. etc`
and then you can echo it back in your second formail.
--
____________________________________________________________________________
Doug Hughes Engineering Network Services
System/Net Admin Auburn University
doug(_at_)eng(_dot_)auburn(_dot_)edu
Pro is to Con as progress is to congress