On Wed, 2 Jul 2003, [big5] Chris Wong wrote:
CW> Hi all,
CW>
CW> I want to write a script that would send a
CW> notification email for the rejected sender, but how
CW> can i combine the original message with the
CW> notification mail?
CW>
I save most of the headers to a file,
:0 hcw : ${MARP_REPLY_FILE_1}.lock
| formail -U Received: \
-I Envelope-to: \
-I "${MARP_STATUS_HEADER}" \
| awk '{print "> " $0}' > "${MARP_REPLY_FILE_2}"
then add the first twenty lines of the body to that file. A script then
mixes that file with the "sorry I don't love you" message and stores it in
another file.
:0 bicw : ${MARP_REPLY_FILE_1}.lock
# copy the body with a "> "
| head -20 | awk '{print "> " $0}' >> "${MARP_REPLY_FILE_2}"; \
"${MARP_REPLY_SCRIPT}" >> "${MARP_REPLY_FILE_1}"
That is then sendmailed.
:0 hcw : ${MARP_REPLY_FILE_1}.lock
# wait for it to finish
| (formail -rtz -A"X-Loop: ${MARP_XLOOP}" \
-I"Precedence: junk" \
-I"X-Message-Flag: Mundungus Autoresponder Requests a Password" \
-I"From: ${MARP_REPLY_FROM}" \
-I"Bcc: ${MARP_BCC}" \
-I"Subject: Re: ${MARP_OLD_SUBJECT} ${MARP_NEW_SUBJECT}" \
-I"Reply-To: ${MARP_REPLY_TO}"; \
cat "${MARP_REPLY_FILE_1}" ) \
| $SENDMAIL -odd -oi -f "${MARP_REPLY_FROM}" -t
Alan
( Please do not email me AS WELL as replying to the list. Please
address personal email to alan+1@ as lists@ is not read. A
password autoresponder may be invoked if this email is very old. )
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail