Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!dog.ee.lbl.gov!cutter.lbl.gov!zorn From: zorn@cutter.lbl.gov (Manfred D. Zorn) Newsgroups: comp.mail.mh Subject: Re: FAQ and convertion from unix-mail to mh Message-ID: <8113@dog.ee.lbl.gov> Date: 15 Nov 90 23:25:30 GMT References: <9011150438.AA01694@bacchus.eng.umd.edu> Sender: usenet@dog.ee.lbl.gov Reply-To: zorn@cutter.lbl.gov (Manfred D. Zorn) Organization: Human Genome Center at LBL Lines: 51 X-Local-Date: Thu, 15 Nov 90 15:25:30 PST In article <9011150438.AA01694@bacchus.eng.umd.edu>, ziegast@ENG.UMD.EDU (Eric Ziegast) writes: |> |> The command inc(1) will INCorperate your unix-mail in MH folders. |> If you want, you can even specify different names for each folder: |> |> inc +mh-folder1 -file unixmail-folder-1 |> inc +mh-folder2 -file unixmail-folder-2 |> At least on our system inc does not do what Eric suggested. inc expects individual messages separated by 4 Cntrl-A s. But with a little gawk script you can scan through your old mail file and generate perfect MH "single-message-in-a-single-file" files. |> As for MH --> unix-mail, there is no standard way to convert them back. |> But, a few times people responded with some awk scripts that'll convert |> the messages back to BSD Mail format. I looked through some old print- |> outs of this newsgroup and couldn't find them. Could someone repost |> the solution? |> This conversion is somewhat easier since MH provides packf to pack MH files in a folder into a single file. See documentation for details. Of course you must get rid of the 4 Cntrl-A that packf inserts in between the messages. But that's straightforward. Following are 2 awk scripts: --------------------------------------------------- # needs gawk because awk allows only 10 open files # to unpack mail files into separate files for mh # M. Zorn 1990-11-08 BEGIN { FILE = 0 } /^From / { close(FILE); FILE++ } { print > FILE } --------------------------------------------------- your outgoing mail does not have a date line ( at least mine) to translate to MH it needs the date. You can get it from the "From" line: # add date line to old mail /From / {print printf("Date: %s %s %s %s %s \n",$3, $4, $5, $6, $7) } !/From / {print} ---------------------------------------------------