Path: utzoo!utgpu!watmath!att!pacbell!ames!indri!uakari.primate.wisc.edu!csd4.milw.wisc.edu!leah!rpi!batcomputer!lacey From: lacey@batcomputer.tn.cornell.edu (John Lacey) Newsgroups: comp.mail.mush Subject: Re: Patch for ">From:" name parsing in mbox-saved news articles Message-ID: <8585@batcomputer.tn.cornell.edu> Date: 9 Aug 89 01:31:15 GMT References: <14529@bfmny0.UUCP> Reply-To: lacey@tcgould.tn.cornell.edu (John Lacey) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 63 In article <14529@bfmny0.UUCP> Tom Neff writes: } I set my hdrs_format to show the "%n" field (the author's name) but this } doesn't work too well with some saved news articles which came with a } named "From:" field but not a "Reply-To:" field. For example } } } From music!nashv!goldrec!ctp Mon Aug 8 1989 } Article 1234 of rec.elvis: } Path: mybox!music!nashv!goldrec!ctp } >From: ctp@goldrec.MUSIC.COM (Colonel Tom Parker) } Newsgroups: rec.elvis } Subject: Re: Sequins checking } ... etc ... } } } Here Mush 6.5.6 (and other versions) will use the bang-path in its } headers display, instead of the readable English name I'd prefer: } 4 > music!nashv!goldrec!ctp Aug 8 Re: Sequins checking } } The reason is that "rn" changes "From:" to ">From:" before saving an } article to a mailbox, so that Mush's header parser in "hdrs.c" doesn't } recognize it. } } I have been able to work around this successfully with the following } patch, which adds a check for ">From:" along with the other fields Mush } already checks for. It appears to be safe for all Mush versions } although the line number count will vary - this context diff was taken } from 6.5.6. I hope Bart and Dan will add it officially: } I recently posted a message here with the exact same problem. A much easier fix (and more elegant to boot) is to fix the program that saves messages to mail boxes (in my case, as an rn user, this is mbox.saver). If you look at mbox.saver, there is the following piece: sed "s/^From/>From/" Simply changing this to sed "s/^From />From /" should solve your problem. Of course, unless you are the news adminstrator or somebody in good standing, you will have to make your own copy of mbox.saver in order to make this fix. You will then have to look at the config.h-dist file (or the config.h file modified for your site) to find out the value of MBOXSAVER. It will look like this: #define MBOXSAVER "%X/mbox.saver" Simply add a similar statement to your environment (setenv or set ..; export) replacing the leading %X/ with the path of your modified version. It makes little sense to me to modify Mush to work around a mistake in rn. Cheers, -- John Lacey lacey@tcgould.tn.cornell.edu cornell!batcomputer!lacey After August 16: jjlacey@owucomcn.bitnet If you have to, try mdl@sppy00.UUCP or maybe {...}!osu-cis!sppy00!mdl