[comp.mail.mh] A better way to "comment out" forwarded message headers?

jerry@ORA.ORA.COM (Jerry Peek) (02/13/91)

Anybody have a better way to solve this problem?

I get a lot of messages that have been re-sent (or re-re-sent...) by people
who don't have the MH "dist" command.  The message they want me to see is
buried under layers of header text, encapsulated in other messages, like this:

	Miscellaneous-headers: ad nauseum
	From: alix
	To: jerry
	Subject: Sandy sent this; you should read it
		...note from alix about message...
	More-miscellaneous-headers: etc etc
	From: sandy
	To: alix
	Subject: Important message
		...more stuff I don't want to read...
	From: bigboss
	To: alix
	Subject: Draft of Plan B
		...this is the message I want! ...


I want to keep the original headers in case I need them later.  But I don't
want to wade through them most of the time.  When I scan, I want to see this:
	1234 02/23  bigboss     Draft of Plan B
instead of the mostly-useless:
	1234 02/27  alix        Sandy sent this; you should read it
Also, when I show the message, I want to see the useful part right away.

The best fix I've come up with is a shell script that uses "ed" to add this:
	X-Original-Text:
to all lines (including empty lines) before the message I want to read.
Basically, this turns all the encapsulating messages into one big header.
After that, the message looks like this:

	X-Original-Text: Miscellaneous-headers: ad nauseum
	X-Original-Text: From: alix
	X-Original-Text: To: jerry
	X-Original-Text: Subject: Sandy sent this; you should read it
		...
	X-Original-Text:
	From: bigboss
	To: alix
	Subject: Draft of Plan B
		...this is the message I want! ...

I've also added a "x-original-text" component to the "ignores" variable
in my "mhl.format" file.  So, when I show the message, the lines
I see on my screen are the message I want to read; "mhl" doesn't show
the X-Original-Text: lines.

Do you have a better way to do this, besides deleting the forwarded
message headers or using "burst"?  Thanks.

--Jerry Peek, jerry@ora.com

dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) (02/14/91)

In <m0j6MZ2-00009HC@ora.ora.com> jerry@ORA.ORA.COM (Jerry Peek) asks
about a better way of avoiding seeing lots of old headers in
re-re...re-sent messages.

Although I don't have a solution, I have a solution to a *differnet*
problem :-) that might be adaptable.  My strategy for filing bounced
mail was to "inc" it into a regular mail message with the script below,
which I call "incit".  It works with most bounced messages though
probably not all.

#! /bin/sh
# given a bounced message, looks for "Unsent message follows" line
# and incorporates rest as a real message.  -- Rahul Dhesi
tmp=/tmp/$$
trap "/bin/rm -f $tmp; exit" 0 1 2 15

if test $# -lt 1; then
   echo 'usage:  incit msg ...'
   echo "(bounced messages are inc'd as real messages.)"
   exit 1
fi

for msg in `pick "$@"`; do
   show "$msg" -noshowproc -noheader | 
      sed -e '1,/----- Unsent message follows -----/d' > $tmp &&
      inc -file $tmp
done
--
Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi