VMS -> mh/exmh -> Netscape -> IMAP
Adapted from Alan Jonckheere and Paul Russo, D0 Experiment
This fairly basic procedure to convert VMS mail
to IMAP mail. The procedure
isn't perfect and you may see some fine details of the message (headers only)
that look funny but no information is lost. No files are destroyed at any
step. So there is no chance of losing any of your mail until you explicitly
delete it. The downside is that you need disk space in three places, perhaps
lots of it.
The conversion is a multi-step process:
VMS -> mh (on Unix) -> netscape (on Unix) -> IMAP.
NOTE: you can stop at any stage. Going just to the "netscape" stage will
leave you with a flat text file per VMS mail folder.
You can then ftp it anywhere and
use grep, search, find etc. as well as any normal editor on them.
This is fine for archival purposes.
It uses some old VMS->mh conversion procedures from several years ago
to do much of the work. That doesn't really do the conversion correctly, even
for mh but mh is forgiving enough that it works anyway. This is fixed in the
mh -> netscape step.
The procedure below is pretty convoluted, it's not pretty, but it does work.
- Set your forwarding
- on your VMS machine
- set forward "SMTP%""<username>@fnal.gov"""
note the use of ": the 1-2-3 rule; ", "", """
- set your forwarding on FNAL.GOV
- login to FNAL.GOV, follow menu
- Forgot your password: ask
to reset it for you.
- Determine Disk space needs
- on VMS
- dir/size=all/grand […]*.mai
get the total size of your VMS mail. This will be in 512byte blocks
- on Unix (fcdfsgi2)
- quota -v
get the space you have available on your home/spool area. This will be in
You need a bit over 2 times the space that your mail on VMS is taking.
- Not enough quota? Ask
email@example.com to increase it temporarily.
- on Imap Server (using a Web browser)
- go to
(or imapserver1 or 2 as appropriate)
- you'll be asked for your username and password
- forgotten your password? Ask
firstname.lastname@example.org to have it reset for you.
- Click on "Quota Information"
the summary will give you your quota and the amount used.
You'll need enough to store your new mail. The default is 20 Mbytes
but you can request more. Contact
email@example.com to have your quota increased.
Tell them why and to how much.
- Save your current mail directories if they exist
- On Unix
- mv Mail Mail.save
save your mh mail, if any
- mv nsmail nsmail.save
save your netscape mail
- VMS mail -> mh
This will copy all of your mail from your default VMS mail "drawer" to your
Unix home area, creating a directory in your home area: Mail/ which will
contain one directory per vms mail folder.
Inside those directories each mail message will be a number for the name.
- On VMS
- Create a .rhosts file containing the line:
fcdfsgi2.fnal.gov <your Unix username>
e.g. fcdfsgi2.fnal.gov buckley
- set file/prot=(g,w) .rhosts
change the file protections to those required by rsh.
- Make sure your login.com sends no output to the screen
when using rcp from Unix. If it does, just
"rename login.com login.save" temporarily.
- On Unix (fcdfsgi2)
- mh -> netscape (on Unix)
NOTE: this is not a general mh -> netscape converter.
It will not handle subfolders.
Since there are no subfolders in VMS mail this is not a problem here.
- mkdir nsmail
create an empty netscape mail directory
- setup mh
- setup mailtools
If you need it on other machines contact firstname.lastname@example.org
or save and run the
This command converts the mh format files (correcting their format
on the way) in ~/Mail/* to netscape format mail files, one file
per folder, in ~/nsmail/.
The filename is the folder name.
- Netscape (on Unix) -> IMAP server
- setup www
- netscape &
- Start Netscape Messenger
from "Communicator" pull down menu for example
- Configure Netscape for IMAP
- Under Mail & Groups
- Set your Identity
- Mail Server
- set Incoming Mail Servers to "imapserver3.fnal.gov" or
"imapserver1.fnal.gov" or "imapserver2.fnal.gov" as appropriate.
- set Outgoing Mail server to "fnal.gov"
- Click the IMAP4 button, click the Move deleted mail to trash
- Look under other headings and customize as you wish.
- Exit and restart netscape and messenger.
- Open the Message Center (from Communicator pull down)
You should get a password dialog box. This is your imapserver
You should see entries labeled "Mail on imapserver…" and
"Local Mail". Local Mail is the mail you've just created.
- Check that all your mail is there. Clean up anything you don't
- Open each of the folders in Local Mail. If you don't the next
step will copy the folders without their contents.
- You can now drag and drop the entire "Local Mail", individual
folders or individual messages into the appropriate place on
the IMAP server. This can take a while, so be patient.
If you do "Local Mail" you should probably rename it:
right click on the folder after the copy.
- Make the new mail folders visible to your normal IMAP reader (Netscape
or Outlook Express)
- Start your normal mail reader
- Outlook Express
- Right Click on the imapserver "folder" icon
- Choose "Subscribe"
- Choose Subscribe in from the File menu (on V4.6 anyway)
- Find any folders that don't have a check mark next to them
- Highlight those folders, chose Subscribe
- Clean up, if you wish
- You can now delete:
- On VMS
- del […]*.mai;*
delete all of the original mail.
- On Unix
- rm -rf ~/Mail
remove the mh version
- rm -rf ~/nsmail
remove the netscape version
- mv Mail.save Mail
restore your original mh mail directory
- mv nsmail.save nsmail
restore your original netscape mail directory
Any questions or problem reports should be reported to the
CDF Task Force(email@example.com)