On Tue, Oct 12, 1999 at 09:52:44AM +0200, Thomas Roessler wrote:
> When using unstable, "resend-message" essentially behaves like the
> recalling of a postponed message.  Actually, it shares lots of code
> with that function.  Thus, you can just re-send the message.
> 
> The problem with this is that the message will be sent depending on
> the headers, that is, every recipient gets the message again.
> 
> You can work around this by changing the To and CC headers of the
> submission to ORig-To and Orig-CC or something like that, and by
> adding a To header of your own.  As an alternative, it should be not
> too difficult to implement a send-to function on the compose menu,
> which sends a message with the given headers to recipients which are
> entered on a prompt.
> 
> Would this fit your needs?

Thanks for the response. 

LISTSERV(tm) has a moderation option that sends messages to be posted
to the editor for approval. Approval requires that the MUA insert
"Resent-From: the_editor", and "Resent-To: the_list" header lines and
to leave the "From: ..." line as is. Mutt does this when a message is
"bounced", but it does not offer the opportunity to edit the bounced
message. However, with the help of members of this list, I've now got
a shell script that allows editing after bounce is selected. Normally,
it simply calls sendmail. However, if a message is bounced, the
presence of "Resent-From: the_editor" in the headers results in a call
to an editor so any excess quoting, etc., can be fixed. Since there
may be a large number of messages to be approved that need no editing,
minimizing the number of keystrokes is important, and this solution
does that. All that's required is "b", the alias for the list address,
"Enter" to confirm, and the editor exit key(s). Here's the current
version of the script "bounce":

(.muttrc has set sendmail="/home/rex/bin/bounce")

#! /bin/sh
# uses ideas from a script by Winfried Szukalski <[EMAIL PROTECTED]>
from_file=${HOME}/.sendit_pre
to_file=${HOME}/.sendit_post
POSTTOOL=/usr/lib/sendmail
POSTARGS="-oi -oem -t"
EDITARGS="-tmp -f mail_mode"
cat > ${from_file}
if (grep ^"Resent-From: $USER@" ${from_file})
 then
  sed '/Delivered-To: '$USER'@/d' ${from_file} > ${to_file}
  mv ${to_file} ${from_file}
  $VISUAL ${from_file} ${EDITARGS}
fi   
${POSTTOOL} ${POSTARGS} < ${from_file} 
#rm -f ${from_file} 

This seems like a reasonable solution that doesn't require adding code
to Mutt. I am concerned that by calling sendmail with the "-t" option
instead of passing parameters as Mutt does I may be causing a problem
that hasn't shown up yet. OTOH, perhaps the only reason for Mutt's
passing parameters is to pass  "--" (which I do not need or want).

Regards,

-rex

Reply via email to