Keywords: Mail, Email, VMS, VAX, Pine, Elm, Unix, mbox

With Y2K just over the horizon, many departments are finding that the trusty old VAX systems are in need of little help when it comes to the dealing with today's technology.  The problem is "what can we do with the 20+ years of electronic mail that has accumulated with our users?"  Before I answer that let me give a bit of background on the topic….

     The VMS operating system which runs on most VAX stations use an electronic mail system that was designed back in the days of the BITNET.  Because of this the format for storing it's mail and the way it processes host/usernames is radically different from today's SMTP standards.
     VMS Mail by default stores its messages in files with names like "
MAIL$0AC8418900050098.MAI;1" and does so for each message.  In some cases users who don't regularly ferret their new mail away into folders can find literally thousands of these files in their home directory (occupying tremendous amounts of space)
     Modern UNIX systems store mail messages grouped into a single file using the "mbox" format.  This has the advantage of reduced overhead (fewer inodes need to be allocated) and simplified administration, but with the disadvantage of requiring additional file parsing and formatting restrictions. Unfortunately the two approaches are completely incompatible without some conversion assistance.
     To facility this there now exists a small utility "vms2mbox" which converts from the VMS format to the Unix mbox format.  It is designed to handle LARGE numbers of messages and is written in standard PERL5 to allow it to be run on any system with a Perl distribution (Unix variants, Linux, Win9x, WinNT, yadda yadda yadda)
     The script has the ability to properly translate from old BITNET, CBS, and all manners of SMTP addresses.  It supports translation of defunct BITNET addresses to modern SMTP equivalents, and can handle a number of foreign syntaxes.  It will additionally create and maintain simple databases for host translation to ease migration of multiple systems.

INSTALLATION

Download the tar vms2mbox-2.0.tar.gz to your Unix system.  Untar the archive. This will create the VMS directory hirarchy containing the VMS/vms2mbox/   and VMS/vms_nick2address trees.  In the vms2mbox tree you will find two script and a TestSuite directory.  Of the two script:

vms2mbox.pl does the actual conversion of extracted VAX folders to mbox format
mail_convert.pl is a wrapper that runs vms2mbox repeatedly on a list of folders and allows for automatic resumption upon errors or aborted runs.

Edit the first line of each script to reflect the path to your perl distribution.  Make a copy of the testnodes.txt file and edit it to reflect BITNET mappings at your site.

Optionally for system wide installation copy the scripts to one of the system bin directories
.

VAX Mail Extraction

Before you can run the conversion script you will need to extract all the VMS mail folders.  So for each folder (from the VMS mail program) issue:
MAIL> set folder foldername
MAIL> extract/all foldername.vms
This will create a file "foldername.vms" which will contain all the messages that were previously in that folder.  Transfer these files over to the Unix machine and place them in a directory.

Mail Conversion

For each folder issue a command of the form (where the --prompt options allows for interactive prompting and the --nodefile=dec_nodes.txt is a file containing the Bitnet mappings):

> vms2mbox --prompt --nodefile=dec_nodes.txt --infile=foldername.vms --outfile=foldername.mbox
Or
> vms2mbox --nodefile=dec_nodes.txt < foldername.vms > foldername.mbox

     
If the program encounters problems or if it can not handle a message it will print an error message.  If all goes well a file "foldername.mbox" will be create which should be readable by all modern mail programs. 
     If you encounter problems or want additional options see the --help option or read the documentation.