Path: utzoo!censor!geac!jtsv16!uunet!tut.cis.ohio-state.edu!bloom-beacon!CSE.OGC.EDU!schaefer From: schaefer@CSE.OGC.EDU (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: Mush MSG_SEPARATOR and rn mbox.saver Message-ID: <8908052249.AA21356@cse.ogc.edu> Date: 5 Aug 89 22:49:32 GMT Organization: The Internet Lines: 78 On Aug 5, 8:43pm, John Lacey wrote: } Subject: Mush MSG_SEPARATOR and rn mbox.saver } } I am having a problem with Mush. I am trying to modify the mbox.saver } shell script from rn to drop the "Article %a of %C" line, and the leading } "Path:" line as well. } } Now, I drop the } offending lines, and use as the first line of the message the second } line of the actual article, as it is in %A (rn notation, /usr/spool/news/... } in my case), changing the from: to a from_ (i.e., "From "). Nonetheless, } Mush is not recognizing this line. Why not? Does Mush require the } MSG_SEPARATOR line to contain something other than simply a leading from_? Mush accepts a number of formats for the From_ line. The basic form is From address ctime-date where the ctime-date is a 26-character date in ctime(3) format and the address does NOT have any (My Name Here) or other comment fields. Mush intentionally does NOT recognize lines that do not match this format or one of its dozen or so variations; if it did, this line: >From the halls of Montezuma to the shores of Tripoli (it did not originally have a leading ">", though some mailers may have put one there) would incorrectly split this message into two parts. That said, the most helpful thing I can probably do is to send you the mbox.saver that I use. It doesn't bother to strip the "Article N of ..." or "Path:" lines, it just rewrites the arg list a little and then calls the usual mbox.saver (the location of which probably varies from site to site, look it up). It sometimes runs into problems with RN's internal buffer sizes for the argument list and so on, and it works better from the "w"rite command than from the "s"ave command (with "s"ave you don't really need to include the Subject: as I have at the end of this script). #!/bin/sh # mbox.saver -- sh script to save netnews articles via rn # # Arguments: # 1 Full name of article (%A) # 2 Public news spool directory (%P) # 3 Directory of current newsgroup (%c) # 4 Article number (%a) # 5 Where in article to start (%B) # 6 Newsgroup name (%C) # 7 Save destination (%b) # 8 Date and time (See below) # 9 Name of poster (%t) # 10 Subject (%s) # # This script is a "preprocessor" for the default mbox.saver (currently # residing in /usr/local/lib/rn). It tacks a few extra words onto the # arguments it gets to make everything compatible with "mail -f", then # invokes the default saver. # # This script is intended to be used with the following rn environment: # # setenv MBOXSAVER '%p/mbox.saver %A %P %c %a %B %C \"%b\" \ # \"rn %(%[posted]!=^\$?%[posted]:%(%[date]=^\(\w*\), \ # \(\w*\)-\(\w*\)-\(\w*\) \([^ ]*\)?%1 %3 %(%2=..?%2: %2) %5 19%4))\n\" \ # \"%f\n\" \"%s\"' # export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$) first=$1 name=`/bin/echo $9 | sed 's= (.*)=='` shift /usr/local/lib/rn/mbox.saver "$first" "$1" "$2" "$3" "$4" "$5" "$6" \ "From $name $7\ Subject: $9" -- Bart Schaefer "And if you believe that, you'll believe anything." -- DangerMouse CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer