Thomas Roessler <[EMAIL PROTECTED]> wrote:
>
> 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.

Seems like it would be just as easy to use edit-message, change the
message around, then when you're done, go ahead and <bounce> the
resulting edited message.  Doesn't sound too difficult, and works with
current code.

rex <[EMAIL PROTECTED]> wrote:
>
> #! /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 doesn't look right.  "sendmail -t" is going to read the message's
headers, and if there are Cc: recipients, they will get a second copy of
the message sent to them, because of your bounce mechanism.

> 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.

Mutt passes the recipients to your script, and you should go ahead and
pass them on to sendmail; then the message will go only to the recipient
specifies in your <bounce> command.

POSTARGS should have "-t" removed, and your call to ${POSTTOOL} should
look like this:

    ${POSTTOOL} ${POSTARGS} "$@" < ${from_file} 

Actually, Mutt's arguments that it passes to your script might already
include -oi and -oem, so you probably could forget ${POSTARGS} entirely.


Having said all that, perhaps you should give <edit-message> and
<bounce> another try.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |    PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44

Reply via email to