On Tue, Oct 12, 1999 at 03:37:27PM -0500, David DeSimone wrote:
> 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.

Yes, this would be an easy solution, but it doesn't work for me (95.3i).
If the message is edited ("e"), the bounce function is disabled, and "b"
results in a Bcc: query instead of bouncing the message as it normally
would.
 
> 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.
>
> 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.

I knew there was a reason I didn't like "-t". Thanks.

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

I've looked at $@. Mutt passes "--", then the address(es), and .muttrc
includes "-oi -oem" in the sendmail call, so they may be needed (I
have no idea what they do, and couldn't find them in the sendmail docs
I have).

I'll remove the "-t" and use "$@", as you suggest, however I want to
dump the first argument ("--") first, as it makes premail choke. A
shift command should handle that, eh?

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

I did, just before writing this. It still doesn't work for me. Does
it work for you?

Thanks,

-rex

Reply via email to