[comp.mail.elm] Elm <-> MH utility?

chaffee@reed.UUCP (Alex Chaffee) (09/17/90)

I'm getting ready to write a sed or awk script which converts MH folders
into standard /usr/spool/mail-style folders, so that elm can read them.  But
before I do, I thought I should ask if anyone else has such a beast.

Much obliged,

 - Alex
-- 
Alex Chaffee
chaffee@reed.{UUCP,BITNET}
Reed College, Portland OR 97202
____________________

frechett@boulder.Colorado.EDU (-=Runaway Daemon=-) (09/18/90)

In article <15473@reed.UUCP> chaffee@reed.UUCP (Alex Chaffee) writes:
>I'm getting ready to write a sed or awk script which converts MH folders
>into standard /usr/spool/mail-style folders, so that elm can read them.  But
>before I do, I thought I should ask if anyone else has such a beast.
>
>Much obliged,
>
> - Alex
>-- 
>Alex Chaffee
>chaffee@reed.{UUCP,BITNET}
>Reed College, Portland OR 97202
>____________________


Well, originally I would have said to use packf, but after playing with it I
see that it doesn't make mail readable files.  But it does set up all the
messages in one file.  I think that it is still useful, so here is how I 
might go about doing what you need.  I tryed this and it works fine.  Just make
an alias and substitute in control-A for ^A.
alias packit 'packf +\!^ -file \!$ ; cat \!$ | sed "/^A^A^A^A/g" | tee > \!$'

Given that you have a folder called +ziltch you can go to Mail directory
and type 
packit ziltch Ziltch    and it will pack all the messages into Ziltch and 
then it runs it through sed and replaces all the ^A^A^A^A with spaces and then
copies the edited version back to the original.  
This little alias will create a file that you can read with mail.  


Hope you can use it.  BTW I just thought this one up, so if you find that I 
have not tested it extensively enough then sue me.  ;)  I do know that 
it worked for me quite well.

	ian
--

-=Runaway Daemon=-

chaffee@reed.bitnet (Alex Chaffee,(259),,2341988) (09/22/90)

In article <15473@reed.UUCP> chaffee@reed.UUCP (Alex Chaffee) writes:
>I'm getting ready to write a sed or awk script which converts MH folders
>into standard /usr/spool/mail-style folders, so that elm can read them.  But
>before I do, I thought I should ask if anyone else has such a beast.
>
>Much obliged,
>
> - Alex

Several people responded; one actually sent me a shell script which seemed
to do exactly what I wanted.  Unfortunately, right at that moment, the file
system filled up and I lost the mail.  (I actually ended up saving a
0-length file, then deleting the original.)  

So could whoever it was please send it to me again?

Still more obliged,

 - Alex

merithew@amy9.stanford.edu (Robert Merithew) (10/11/90)

frechett@snoopy.Colorado.EDU (-=Runaway Daemon=-) writes:

>alias packit 'packf +\!^ -file \!$ ; cat \!$ | sed "/^A^A^A^A/g" | tee > \!$'
>
 ....
>This little alias will create a file that you can read with mail.  
>

I find that this does not work for me.  When I use elm to try to
read the resulting file, it complains that the file is corrupt.  The
only way I can get elm to recognize a file as a folder is by pasting
the first line from a valid mbox-formatted file (generated elsewhere)
into the first line of the file that your alias generates.  Such a
first line is:

From portia.stanford.edu!shelby!decwrl!elroy.jpl.nasa.gov!ncar!mephisto!ncsuvx!mcnc!duke!egr.duke.edu!dukee!js Mon Sep 10 18:17:00 PDT 1990

If I do not do this cut-and-paste, each message generated by your
alias starts with 'Return-Path:' etc.

What is the real definition of an mbox file?  What the heck is supposed
to delimit messages?  What can I change the ^A^A^A^A to to fool elm into
analyzing the message headers?

-Robert M.
 AIR Consulting
 Stanford University