Newsgroups: comp.mail.mush
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!dont-send-mail-to-path-lines
From: schaefer@cse.ogi.EDU (Barton E. Schaefer)
Subject: Re: mush & nn
Message-ID: <9105232226.AA09465@cse.ogi.edu>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: Z-Code Software Corp.
Date: 23 May 91 22:26:24 GMT
Lines: 56

On May 23,  1:44pm, Nino Margetic wrote:
} Subject: Re: mush & nn
}
} >.mushrc file which works nicely in mail, doesn't seem to have any effect
} >when mush is used from the news reader! Is that due to the fact that mush
} >is used with -send and -draft, while the input messg comes from the
} >stdin??
} 
} >Is there a way of overcoming this problem (ie not being able to use
} >my_hdr option /and, for that matter, other goodies which mush provides/),
} >or am I (yet again :-) missing something important??
} 
} **** Yup. TFM. It says that mush will only add Date: and From: fields if
} they are missing... Waiting for suggestions how to add/change a field
} (awk, sed, perl)???

What you want to do is to use mush to actually *edit* the outgoing
message, not just to send it.  I don't know if nn provides a way to
do that.  You can certainly add or change fields with sed or perl;
change your script to do something like

    perl perl_script | mush -send -draft -

where perl_script modifies the headers.

} Furthermore, in the meantime, I discovered that something funny is going on.
} On follow-ups, there are no problems, but mush is not invoked at all.

Correct.  Mush doesn't know how to post news, just how to send mail.

} output from ps -x:
} 
}   PID TTY STAT  TIME COMMAND
} 11935 x6  R     5:50 /common/teexnma/bin/mush -U -h -
}           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
} 
} The mush has been running for 5 (!!!) mins, and in the end I had to
} kill it. Needless to say, the message never got delivered...

Looks like mush is never seeing end-of-file on its standard input.
I suggest you first upgrade to 7.2.3, then see what happens.

} Furthermore, I had to change -send to -U, and -draft to -h, since the
} former produced odd results in ps -x (i.e., mush was running with
} params: -U end -h aft - ).

That's because mush's argument parser converts -send to -U and -draft
to -h by strcpying into the elements of argv.  The only thing that is
messed up is your ps output, because it doesn't print the argv as an
array of nul-terminated strings, it just prints literally what is in
the block of memory where the argv was stored.


-- 
Bart Schaefer                                           schaefer@zipcode.com
Z-Code Software Corporation                             schaefer@cse.ogi.edu
