home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
PMM2ELM
/
PMM2ELM.TXT
< prev
Wrap
Text File
|
1997-02-15
|
3KB
|
66 lines
pmm2sh.sh: Create ELM or YARN mail folders from PMMail mail folders.
Move to:
http://www.cdrom.com/pub/hobbes/internet/pmm2elm.zip
http://www.leo.org/pub/comp/os/os2/leo/mail+news/pmm2elm.zip
http://hobbes.nmsu.edu/os2/internet/mail/pmm2elm.zip
This converts the mail in PMMail (1.x) folders into a format the
OS/2 port of elm 2.3 by Kai Uwe Rommel can handle: Messages
are separated by 20 ^A (Ctrl-A) characters.
(In vi, e.g., enter those by hitting Ctrl-V -Ctrl-A).
Actually, it doesn't _convert_ the PMMail folder, as it doesn't
change the PMMail folder, it just creates ELM folders.
If you change the 20 ^A to a full stop, and ^L^@^@ you can also
use it to change the stuff to MAILBOX folders YARN understands.
This script relies on the following to be installed on your
computer: sh.exe (tested with sh.exe from ksh527rt.zip), and
cat.exe and mv.exe. They require the emx runtime library
(emxrt.zip)and all that can be found on ususal OS/2 ftp sites.
Put this script somewhere in your path.
To create a mail folder, say from the folder 'John', open a
command line window, start sh.exe, and go to the directory where
that folder lives, e.g.:
sh.exe
cd E:/bin/os2/pmmail/pmmail/stefan0.act/Mail0.FLD/John0.FLD
There you will find a lot of files with the extension *.msg, and
these are your messages. Simply type:
pmm2elm *.msg > jdoe
and you will have an ELM mail folder of the name 'jdoe'.
Now you can move that one into your $MAIL directory, and elm
will find it:
mv -i jdoe f:/usr/sad/mail
If the folder 'John' exists already it will complain, then you
can simply append the stuff from PMMail to the existing ELM folder:
cat jdoe >> f:/usr/sad/mail/jdoe
and elm is happy with that, too.
If you have a large directory structure you will want to make that
more automatic, but I don't, and it is a bit hard to guess from
PMMails 8.3 folder names what the ELM folder name is that you want.
In the above example the PMMail folder for John actually becomes the
ELM folder jdoe, which is what his email name might be (say:
John is jdoe@bla.blub).
Also, one can probably do all that neatly with REXX, but people who
use elm are likely to have all the GNU stuff (sh, mv, cat, ..)
anyway.
As always: Back up your ELM or YARN folders before you play with this,
and it comes without any explicit or implied warranty, you use it at
your own risk.
Stefan A. Deutscher, 15-Feb-1997
(sad@utk.edu, stefand@ibm.net, stefand@elphy.irz.hu-berlin.de)