home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / admin / 7260 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.7 KB

  1. Xref: sparky comp.unix.admin:7260 comp.mail.misc:4540
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!olivea!spool.mu.edu!howland.reston.ans.net!paladin.american.edu!gatech!concert!uvaarpa!murdoch!elvis.med.Virginia.EDU!sdm7g
  3. From: sdm7g@elvis.med.Virginia.EDU (Steven D. Majewski)
  4. Newsgroups: comp.unix.admin,comp.mail.misc
  5. Subject: Re: VMS to UNIX transition, e-mail questions
  6. Message-ID: <1993Jan26.235747.22309@murdoch.acc.Virginia.EDU>
  7. Date: 26 Jan 93 23:57:47 GMT
  8. References: <C1GuE7.LtF@ra.nrl.navy.mil>
  9. Sender: usenet@murdoch.acc.Virginia.EDU
  10. Distribution: usa
  11. Organization: University of Virginia
  12. Lines: 91
  13.  
  14. In article <C1GuE7.LtF@ra.nrl.navy.mil> browning@ccfsun.nrl.navy.mil
  15. writes: 
  16. >
  17. >A concern has been raised about "old" messages stored in VMS
  18. >MAIL.MAI files.  If our users simply forward them to the
  19. >UNIX platform or the file server, the original date of
  20. >receipt will no longer appear when the UNIX user lists the
  21. >message headers, i.e. they will see the date of transfer
  22. >instead.  This should not be a problem for users who took
  23. >our e-mail course and organized their messages in folders,
  24. >as was highly recommended.  However, we anticipate that a
  25. >number of these users will have many (a year's worth)
  26. >messages stored in one folder, "MAIL", and that their most
  27. >common method of searching through the messages listing is
  28. >by scanning the receipt dates.
  29. >
  30.  
  31.  
  32. How hard it is depends (partly) on which mail-reader you use. 
  33. There is no real standard (yet) for Unix mailboxes, and some
  34. mail readers are fussier than other. 
  35.  
  36. MUSH may be the most accepting of the lot. 
  37. For the others - what they will be fussy about is the exact format of
  38. the date in the "From " line. 
  39.  
  40. What will work for mush is:
  41.  
  42. on VMS:
  43. Mail>EXTRACT /ALL mailbox.vms
  44.  
  45. and then ftp ( or transfer in some way) the mailbox.vms file to the unix system.
  46.  
  47.  
  48. Run the file thru 'awk' with the following script:
  49.  
  50. # awk.cmd
  51. # if "\f\nFrom:" then assume it is beginning of a VMS Mail message
  52. #   write out a couple of newlines, change "From:" to "From " and 
  53. #   skip any VMS comments that might be on the line between the 
  54. #   address and the date. ( If might be possible for comment string 
  55. #   to lead the address, but all of the messages I have start with
  56. #   the address. ) 
  57. /\014/  { 
  58.       getline;
  59.       if ( $1 ~ /From:/ ) { 
  60.         print "\n\n\n" ;
  61.         print "From " $2 "\t" $(NF-1) " " $NF ;
  62.         NF = NF - 2 ; 
  63.       }
  64.       else { print "\f" ; } 
  65.     }
  66. { print; } 
  67. # end
  68.  
  69.  
  70. e.g.:
  71.  
  72.  awk -f awk.cmd <mailbox.vms >mailbox.unix 
  73.  
  74.  
  75.  
  76.  'mush -f mailbox.unix '
  77.  
  78. should now work and display the correct date information. 
  79. But elm,pine and some other mailers will still not like the VMS format of 
  80. the dates. 
  81.  
  82. ( Saving all of the messages to another file with mush didn't fix the 
  83.   date problem. I don't know if piping them all to another file or to
  84.   a save command works any better. ) 
  85.  
  86. If you need to fix the header fields further, try the 'formail' 
  87. program in the 'procmail' package from: 
  88.          Stephen R. van den Berg (AKA BuGless).   
  89.        berg@physik.tu-muenchen.de
  90.        berg@pool.informatik.rwth-aachen.de
  91.  
  92. I found this quite useful when I accidentally munged my mailbox into MH 
  93. format, and couldn't find another way to restore it. 
  94.  
  95.  
  96. ===============================================================================
  97.  Steven D. Majewski            University of Virginia 
  98.  sdm7g@Virginia.EDU            Box 449 Health Sciences Center
  99.  Voice: (804)-982-0831            1300 Jefferson Park Avenue
  100.  FAX:   (804)-982-1616            Charlottesville, VA 22908
  101. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  102. Former UVA Department of Physiology, now Department of Molecular Physiology
  103. and Biological Physics! [ Still the same spacious offices in Jordan Hall 
  104. - only the letterhead has changed! ]
  105.