| What I want to know is how I can store a good copy of the
| message headers in a variable or something which can then
| be used in my auto-reply? I've tried storing the headers
| in a variable but the carriage returns are lost (and there's
| a finite limit to the length of headers that can be stored
| in a variable).
The newlines wouldn't be lost unless you tried to echo it without quoting
the variable.
I'm sorry, I should have included my recipie portion which
attempted to get the headers:
-- cut here --
:0 h
HEADERS=| echo
#
# Generate the auto-reply
#
:0 h
* !^FROM_DAEMON
* !^X-Loop: X-BOUNCE-FILE-SIZE
| (formail -r \
-I"Subject: Returned Mail: ${SUBJECT}" \
-I"From: MAILER-DAEMON(_at_)${HOST}" \
-A"X-Max-Message-Size: ${MAXMSGSIZE} bytes" \
-A"X-Bounced-Reason: Maximum Message Size Exceeded" \
-A"X-Loop: X-BOUNCE-FILE-SIZE" ; \
cat /usr/local/etc/autoreplies/bounce-file-size; \
echo ${HEADERS} ) | $SENDMAIL -t
-- cut here --
This recipie portion echos the headers but doesn't save the carriage returns.
In any case, I tried your suggestion and it worked wonderfully... thanks!