On Mon, Oct 11, 1999 at 07:07:32AM +0000, winfried szukalski wrote:
> I use the script you are looking for together with
[...]
Thanks much, Winfried. I have adapted your script to call the editor
only when the message is bounced. The script resides in /home/rex/bin
and is named "bounce." .muttrc has
set sendmail="/home/rex/bin/bounce"
#=================> bounce <============
#! /bin/sh
# adapted from a script by Winfried Szukalski <[EMAIL PROTECTED]>
# allows editing a bounced ("b") message before sending it.
from_file=${HOME}/.sendit_pre
POSTTOOL=/usr/lib/sendmail
POSTARGS="-oi -oem -t"
cat > ${from_file}
if (grep "Resent-From: $USER@" ${from_file})
then
$VISUAL ${from_file}
fi
${POSTTOOL} ${POSTARGS} < ${from_file}
rm -f ${from_file}
#================> end bounce <=============
In normal use, bounce is transparent. If a message is bounced, the
presence of "Resent-From: [EMAIL PROTECTED]" in the header triggers the
"if (grep ..." and my editor (XJed) opens the message.
The ability to edit a bounced message is very useful for listowners
using LISTSERV(tm) for moderated lists.
-rex