home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pmm2elm.zip / pmm2elm.txt < prev   
Text File  |  1997-02-15  |  3KB  |  66 lines

  1.  pmm2sh.sh: Create ELM or YARN mail folders from  PMMail mail folders.
  2.  
  3.  
  4.  Move to:
  5.  
  6.  http://www.cdrom.com/pub/hobbes/internet/pmm2elm.zip
  7.  http://www.leo.org/pub/comp/os/os2/leo/mail+news/pmm2elm.zip
  8.  http://hobbes.nmsu.edu/os2/internet/mail/pmm2elm.zip
  9.  
  10.  This converts the mail in PMMail (1.x) folders into a format the
  11.  OS/2 port of elm 2.3 by Kai Uwe Rommel can handle: Messages 
  12.  are separated by 20 ^A (Ctrl-A) characters.
  13.  (In vi, e.g., enter those by hitting Ctrl-V -Ctrl-A).
  14.  Actually, it doesn't _convert_ the PMMail folder, as it doesn't
  15.  change the PMMail folder, it just creates ELM folders.
  16.  If you change the 20 ^A to a full stop, and ^L^@^@ you can also
  17.  use it to change the stuff to MAILBOX folders YARN understands.
  18.  
  19.  This script relies on the following to be installed on your
  20.  computer: sh.exe (tested with sh.exe from ksh527rt.zip), and
  21.  cat.exe and mv.exe. They require the emx runtime library 
  22.  (emxrt.zip)and all that can be found on ususal OS/2 ftp sites.
  23.  Put this script somewhere in your path.
  24.  
  25.  To create a mail folder, say from the folder 'John', open a
  26.  command line window, start sh.exe, and go to the directory where 
  27.  that folder lives, e.g.:
  28.  
  29.   sh.exe
  30.   cd  E:/bin/os2/pmmail/pmmail/stefan0.act/Mail0.FLD/John0.FLD
  31.  
  32.  There you will find a lot of files with the extension *.msg, and
  33.  these are your messages. Simply type:
  34.  
  35.   pmm2elm *.msg > jdoe
  36.  
  37.  and you will have an ELM mail folder of the name 'jdoe'.
  38.  Now you can move that one into your $MAIL directory, and elm
  39.  will find it:
  40.  
  41.   mv -i jdoe f:/usr/sad/mail
  42.  
  43.  If the folder 'John' exists already it will complain, then you 
  44.  can simply append the stuff from PMMail to the existing ELM folder:
  45.  
  46.   cat jdoe >> f:/usr/sad/mail/jdoe
  47.  
  48.  and elm is happy with that, too. 
  49.  If you have a large directory structure you will want to make that
  50.  more automatic, but I don't, and it is a bit hard to guess from
  51.  PMMails 8.3 folder names what the ELM folder name is that you want.
  52.  In the above example the PMMail folder for John actually becomes the
  53.  ELM folder jdoe, which is what his email name might be (say:
  54.  John is jdoe@bla.blub).
  55.  Also, one can probably do all that neatly with REXX, but people who
  56.  use elm are likely to have all the GNU stuff (sh, mv, cat, ..)
  57.  anyway.
  58.  
  59.  As always: Back up your ELM or YARN folders before you play with this,
  60.  and it comes without any explicit or implied warranty, you use it at
  61.  your own risk.
  62.           
  63.  Stefan A. Deutscher, 15-Feb-1997  
  64.  (sad@utk.edu, stefand@ibm.net, stefand@elphy.irz.hu-berlin.de)
  65.  
  66.