Article View: comp.mail.mush
Article #124Patch for ">From:" name parsing in mbox-saved news articles
From: Tom Neff
Date: Wed, 09 Aug 1989 00:03
Date: Wed, 09 Aug 1989 00:03
53 lines
2501 bytes
2501 bytes
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:
$ mush -H -f +headscratch
"+headscratch" [read only]: 4 messages, 0 new, 0 unread
1 Rick Deckard Jul 10 Found another one, I think
2 r Sarah Conner Aug 1 Borrow anarchists handbook?
3 TO: crater@daniken.BERM.TRI Aug 7 Need forwarding address
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:
*** hdrs.c.orig Tue Aug 8 18:31:50 1989
--- hdrs.c Tue Aug 8 18:36:11 1989
*************** char buf[]
*** 545,550 ****
--- 545,551 ----
print("Warning: message contains no `reply_to_hdr' headers.\n");
}
if (p || (!p && ((p = header_field(n, field = "reply-to")) ||
+ (p = header_field(n, field = ">from")) ||
(p = header_field(n, field = "return-path")) ||
(p = header_field(n, field = "from")))))
skipspaces(0);
--
"We walked on the moon -- (( Tom Neff
you be polite" )) tneff@bfmny0.UU.NET
Technical Details
Message-ID:
<14529@bfmny0.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!att!pacbell!ames!indri!uakari.primate.wisc.edu!csd4.milw.wisc.edu!cs.utexas.edu!uunet!bfmny0!tneffShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!att!pacbell!ames!indri!uakari.primate.wisc.edu!csd4.milw.wisc.edu!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UUCP (Tom Neff) Newsgroups: comp.mail.mush Subject: Patch for ">From:" name parsing in mbox-saved news articles Summary: lets you see lots more "real" names in your Mush hdrs display Message-ID: <14529@bfmny0.UUCP> Date: 9 Aug 89 00:03:05 GMT Reply-To: tneff@bfmny0.UUCP (Tom Neff) Organization: ^ Lines: 53