MSSL Basic User Note #15:


VMS to Unix mail conversion in Unix

Philip Smith 03/12/98 V1.0

This document: http://www.mssl.ucl.ac.uk/www_computing/buns/vmsmail.html
In order for users to migrate their mail messages from VMS Mail to Unix , it will be necessary to extract the message(s) and move them to your Unix system.

To extract messages do the following:

  1. From DCL prompt, enter MAIL
    	$MAIL
    
    	MAIL>
    
  2. Make sure you're not forwarding mail from the Unix box to VMS. Look for a ~/.forward file. You probably don't want one on the UNix system unless you're using procmail.
  3. Forward any future mail, if necessary:
    	MAIL> set forward "SMTP%""NJF@MSSLSX.MSSL.UCL.AC.UK""" 
    
  4. If necessary select the approproiate folder or your default mail folder.
    	MAIL> SELECT JOKES
    	%MAIL-I-SELECTED, 15 messages selected
    
  5. At this point you can extract all of the messages in the FOLDER with
    	MAIL> EXTRACT/ALL/HEADER VAX_MAIL.TXT
    		%MAIL-I-CREATED, DISK$XXX:[YOU]VAX_MAIL.TXT;1 created
    
    	MAIL>
    
    This example shows how to place a copy of all the messages in the currently selected folder into a sequential ascii text file called JOKES.TXT.

  6. Once the output file has been created it can be copied using "ftp" to your Unix system. See the man page on ftp or the ftp BUN. Remember to transfer as type ascii.

    Log into a Unix machine, e.g., msslag

    	telnet msslag
          	...
    
  7. Make sure you have a Mail directory
    	mkdir ~/Mail
    
    it doesn't matter if it complains you have one already.

    N.B. other mail readers may use a different directory to "Mail" (like "mail" or "nsmail"

  8. Run the vms2mutt program. The program itself is ~pjs1/bin/vms2mutt. The program takes stdin and writes to stdout. (In this case vax_mail.txt is redirected in and ~/Mail/jokes in this case) is where to put the converted file.
    	prompt% ~pjs1/bin/vms2mutt < vax_mail.txt >! ~/Mail/jokes
    
    This process fixes the "from" date and "From" address and "Subject".
  9. You can remove the vax_mail.txt file.
    	$ rm vax_mail.txt
    
You can now use mutt (or elm or pine) to read your folders. To get into the "jokes" folder type the following at the mutt or elm command prompt:
	Command: c=jokes
To get back to your main/received folder type:
	Command: c!

Program info

It's written in Perl.

See also

Nick's guide to converting your VAX mail to Unix mail on a VAX machine (the above guide is for converting your VAX mail to Unix mail on a Unix machine).
This VMS program is not so good at fixing the addresses.
P.J.Smith --- pjs1@mssl.ucl.ac.uk

WebTechs Mozilla Checked!

WebTechs Mozilla Checked!