[net.mail] How to read saved news via Mail?

olmstead (02/11/83)

I'm in the habit of saving interesting news articles in separate files
such as bugs.uucp, bugs.fsck, etc.  I'd like to review the articles via
"Mail -f" but it doesn't work.  The problem appears to be that Berkeley
Mail doesn't understand "From " lines containing the sender's name in
parentheses, as put there by news version 2.9 (like the article you're
reading now).  Anybody have a fix for this?
				TIA,
				Patrick Olmstead

				...ucbvax!menlo70!sytek!olmstead
				...decvax!sytek!olmstead
				Olmstead.PA@PARC-MAXC.ARPA

martin (02/19/83)

Reading the saved Article using Mail is simple once you have done one
of a few things.

1)	remove the (real name) from the From lines in Article. you can use
	sed (or ed). /^From /s/(.*) //

2)	change Mail to allow From lines with the format that news gives you.
	in head.c add a few more rules so that different From lines are
	accepted:-

#define	L	1		/* A lower case char */
#define	S	2		/* A space */
#define	D	3		/* A digit */
#define	O	4		/* An optional digit */
#define	C	5		/* A colon */
#define	N	6		/* A new line */
#define U	7		/* An upper case char */
#define X	8		/* one [or more] space(s) */
#define	B	9		/* ( to ) , this is for news*/

char ctypes[]   = {U,L,L,S,U,L,L,X,D,O,X,D,D,C,D,D,C,D,D,S,D,D,D,D,0};
char tmz1types[] = {U,L,L,S,U,L,L,X,D,O,X,D,D,C,D,D,C,D,D,S,U,U,U,S,D,D,D,D,0};
char tmz2types[] = {U,L,L,S,U,L,L,X,D,O,X,D,D,C,D,D,C,D,D,S,D,D,D,D,S,U,U,U,0};
char oastypes[] = {U,L,L,S,U,L,L,X,D,O,X,D,D,C,D,D,S,U,U,U,S,D,D,D,D,0};
char newstype[] = {B,U,L,L,S,U,L,L,X,D,O,X,D,D,C,D,D,C,D,D,S,D,D,D,D,0};

then you can change the code below this to parse a B and to look for another
type of From string. we have (as you can see) have 5 types of From lines.

3)	change news to save without the realname. it could put that field
	into a 'Real-Name: ' header.

martin levy,
holmdel, nj.

alb (02/22/83)

An alternate solution to teaching Berkeley Mail about new headers
is to completely remove From/date field checking.  As long as
the mailer itself outputs a legal date field, I see no reason why
it has to be so picky about what it takes in.  To do this, you
merely have to comment/ifdef the date checking code out (two segments
must be removed:  (1) the template defines along with the templates
themselves and the two following routines and (2) a (I think 3-line)
segment of code near the beginning which calls the date checking
routine.  If you remove this, Mail won't care about date field
structure, so full names will be ignored.

jfw (02/23/83)

However, if Mail tries to recognize a "proper" From line, it means that
one day we can get rid of Bell-mail's disgusting habit of changing ``
>From this we can see'' to
>From this we can see'' that Mail is not all wrong.