Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cunixa.cc.columbia.edu!das15 From: das15@cunixa.cc.columbia.edu (Douglas A Scott) Newsgroups: comp.sys.next Subject: Re: Help getting c.s.n into NeXT Mail Message-ID: <1991May3.232426.17484@cunixf.cc.columbia.edu> Date: 3 May 91 23:24:26 GMT References: <1991May2.163344.581@arizona.edu> Sender: usenet@cunixf.cc.columbia.edu (The Network News) Reply-To: das15@cunixa.cc.columbia.edu (Douglas A Scott) Distribution: world,local Organization: Columbia University Lines: 72 Nntp-Posting-Host: cunixa.cc.columbia.edu In article <1991May2.163344.581@arizona.edu> zazula@uazhe0.physics.arizona.edu writes: >I'm trying to get this newsgroup into NeXT Mail on my machine at home >(no network connection). I have an account on a Sun running SunOS(?). >I'm using "rn" to extract the articles. The command I used was >".-$ s" and answered "y" to put it in mailbox format. I then kermited >the file to my NeXT and put it in the file ~/Mailboxes/comp.sys.next.mbox/mbox. >When I run Mail.app and open the comp.sys.next mailbox, Mail crashes with >a core dump. No message, or anything. Is the Sun mail format not the same >as what the NeXT expects? Is there something else I need to do? I think I can help you on this one, having expeienced much grief trying to bring mboxes from other machines over to my Cube to read via Mail.app. Mail.app expects each mail entry to begin with a "From " header. Not "From: " -- that comes later in the header. The first thing after the space between mail entries. Here is an example: *********** >From woof!doug%ponder.csci.unt.edu%vaxa.acs.unt.edu Wed Sep 26 06:04:40 1990 >Return-Path: >Received: by zardoz (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0) > id AA07542; Wed, 26 Sep 90 06:04:39 EDT >Received: from ponder (129.120.3.16) by woof.columbia.edu (3.2/SMI-3.2) > id AA02361; Tue, 25 Sep 90 23:57:54 EDT >Received: by ponder (5.61/1.36) > id AA02604; Mon, 24 Sep 90 22:58:50 -0500 >Date: Mon, 24 Sep 90 22:58:50 -0500 >From: woof!doug%ponder.csci.unt.edu%vaxa.acs.unt.edu (Douglas A. Scott) >Message-Id: <9009250358.AA02604@ponder> >To: doug@ponder.csci.unt.edu%vaxa.acs.unt.edu *********** If all that name and date info is not there, Mail.app cant read it. Some machines create mboxes just like this...most Suns do, for regular mail, for ex. I suspect that rn does not, though, even in mailbox format. I wrote a bizarre little awk script to try to convert mboxes into the correct format. It still needs work, but you are welcome to fiddle with it. I think that some headers will still be passed through incorrectly, but a little editing may be all that is necessary. +++++++++++++++ CUT HERE +++++++++++++ awk ' /^Path:/ { entry[line]=$0; line++;} /^Received: / { entry[line]=$0; line++} /^ id / { entry[line]=$0; line++} /^Date: / { entry[line]=$0; line++; if ( $2 ~ /^[0-9]/ ) { if( length($7) == 0 ) $7="Sun"; fromdate=sprintf("%s %s %s %s 19%s", $7, $3, $2, $5, $4);} else if ( $3 ~ /^[0-9]/ ) fromdate=sprintf("%s %s %s %s 19%s", substr($2,0,length($2)-1), $4, $3, $6, $5); else fromdate=sprintf("%s %s %s %s %s", $2, $3, $4, $5, $6);} /^From: / { if ( $2 !~ /^[A-Za-z]/ ) name = substr($2,2,length($2)); else name = $2; printf ("\n\n\n\n%s %s %s\n", "From", name, fromdate); while(i < line) { print (entry[i]); i++;} } /^*/ { if ($1 !~ /^Received:/ && $1 !~ /id/ && $1 !~ /^Date:/ && $1 !~ /^Path:/) print $0; } ' $1 +++++++++++++= Just say "sh awk.script bad.mbox > good.mbox". Then experiment with the new mbox. Good luck! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Douglas Scott Columbia University Computer Music Studio Internet: UUCP: ...!columbia!woof!zardoz!doug Phone: (703)765-4771