Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!bloom-beacon!kailand.kai.COM!pwolfe
From: pwolfe@kailand.kai.COM (Patrick Wolfe)
Newsgroups: comp.mail.mush
Subject: Re: RMAIL to MUSH conversion
Message-ID: <8908171944.AA15132@kailand.kai.com>
Date: 17 Aug 89 19:44:36 GMT
Sender: daemon@bloom-beacon.MIT.EDU
Organization: Kuck and Associates, Inc., 1906 Fox Drive, Champaign IL 61820, voice 217-356-2288, fax 217-356-5199
Lines: 49

> I'm in the process of converting to mush, after years of rmail
> within Gnu emacs.  I have many rmail files that I would like
> to convert to mush format.  Has anyone done this before?

I had to write the enclosed Perl script to do exactly that when I simply
decided to *try* rmail once.  The damn thing went and sucked up my existing
mbox file, converting it to rmail format, but didn't provide a way to put
it back when I decided to stick with mush!

        Patrick Wolfe   (pat@kai.com, kailand!pat)
        System Manager, Kuck & Associates, Inc.


	#!/usr/local/bin/perl
	#	unrmailit
	$TRUE = 1;
	$FALSE = 0;
	$copy = $FALSE;
	$begin_string = "*** EOOH ***";
	$end_string = sprintf ("%c%c", 31, 12);

	while (<>)
		{
		if ($copy)
			{
			print $_;
			}
		chop;
		if ($_ eq $begin_string)
			{
			if (! $copy)
				{
				print "From unknown@unknown Sat Dec 31 00:01:00 1988\n";
				}
			$copy = $TRUE;
			}
		elsif ($_ eq $end_string)
			{
			$copy = $FALSE;
			}
		}
	exit (0);



-- 

        Patrick Wolfe   (pat@kai.com, kailand!pat)
        System Manager, Kuck & Associates, Inc.