home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!cis.ohio-state.edu!giant.INTranet.COM!del
- From: del@giant.INTranet.COM (G. Del Merritt)
- Subject: Re: VMS mail --> Emacs RMAIL
- Message-ID: <0096359A0B9BE440.2500035C@giant.IntraNet.com>
- Sender: daemon@cis.ohio-state.edu
- Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
- Date: Mon, 9 Nov 1992 05:30:24 GMT
- Lines: 49
-
- >From: grodan@cyklop.nada.kth.se (Mats G Lfdahl)
- >Subject: VMS mail --> Emacs RMAIL
- >Sender: help-gnu-emacs-request@prep.ai.mit.edu
- >
- >I am moving from VMS to unix and I've started reading email with
- >Emacs's rmail. Now, I have a lot of old messages in various folders in
- >the VSM account. Is there a way to transfer them to the unix machine,
- >preserving the original Date:, Subject:, and From: fields?
-
- Gee. I'm on VMS and I use rmail, so the solution is "obvious" to me:
- get a copy of EMACS for VMS and run RMAIL on your messages. Then copy
- the resulting Babyl format files to your U*ix box.
-
- As a possibly simpler alternative:
- - EXTRACT/ALL[/APPEND] the messages in any given VMS folder;
- - take the resulting file and copy it to your "mbox";
- - modify and use the following which was extracted from an RMAIL.EL
- that was _tailored_for_VMS_. I leave the mods to you; "all" you need
- is to understand VMS's mail headers.
-
- ---------------------- from RMAIL.EL for VMS ----------------------
- ;; : Lot's of stuff (including copyleft) omitted
- ;; : Pretend the standard GNU copyleft is here.
- ;; VMS mods by Hal Brand (brand@addvax.llnl.gov)
- ;; :
- (defun rmail-convert-vmsmail-headers ()
- (let ((count 0)
- (case-fold-search nil)
- (previous-header nil))
- ;; Find (and parse) VMS MAIL header, then reformat it.
- (while (re-search-forward
- "^\\nFrom:\t\\(.* \\)\\([0-9 ][0-9]-[A-S][AEOUPC][B-Y]-[0-9].* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9]$\\)\nTo:\t\\(.*\\)\nCC:\t\\(.*\\)\nSubj:\t\\(.*\\)\n"
- nil t)
- (setq count (1+ count))
- (replace-match (if previous-header
- "\n0,unseen,,\n*** EOOH ***\nFrom: \\1\nDate: \\2\nTo: \\3\nCC: \\4\nSubject: \\5\n"
- "\n0,unseen,,\n*** EOOH ***\nFrom: \\1\nDate: \\2\nTo: \\3\nCC: \\4\nSubject: \\5\n"))
- (setq previous-header t))
- (goto-char (point-max)) ;Move to end of buffer
- (if (> count 0) (insert "\n")) ;terminate last message
- count))
- ---------------------- from RMAIL.EL for VMS ----------------------
-
- Good luck
-
- Del Merritt del@IntraNet.com ccavax!giant!del
- IntraNet, Inc., 255 Washington Street, Newton, MA 02158
- Voice: 617-527-7020; FAX: 617-527-6779
-
-