Fermilab Computing Sector

How to migrate off FNALU mail servers- FAQ

Q. Why do I need to migrate mail from FNALU?

A. For the last several years, the primary support for people reading email has been the centralized mail service on the imap servers. These are supported on a 24x7 basis and supercede the support of e-mail on FNALU. In addition, during this time the scope of services and support for FNALU nodes has changed. Most importantly, 24x7 support is no longer provided.

Therefore, beginning Oct. 1, 2007, FNALU nodes will no longer accept email for its users. Users currently receiving email on one of the FNALU nodes will need to begin to use the Imap service. Directions for doing so are included below.


You will still be able to read your email from the imap servers on FNALU and if needed folder mail in in AFS space on FNALU. However, any email foldered outside of the Imap service will not have 24x7 support.

Q. What is the general procedure for migrating e-mail?

A. These are general steps in determining if you need to migrate. Detailed information for each step is found in the remainder of the faq.

You may be in one of several situations. Two of the most basic are either:

    You have been reading your e-mail on fnalu and saving it to a folder. The mail is in your afs path and is saved in a mh, mbx or other mail format. If this is the case in your situation, proceed to step #2.

    You have been reading your e-mail on fnalu and not saving it to a folder. The mail stays in /var/spool/mail. If this is the case in your situation, continue with step 1.

    If neither one of the above descriptions fits your situation, contact the helpdesk.

  1. You have to read, then either delete the mail that is read, or save it to a folder. The migration tool only works on folders. If you don't have enough afs space to handle this process, apply for more afs space at by filling out this web form , then proceed to step 2.

  2. Establish an account on an imap server if you don't already have one.

  3. Change your mail forwarding so that all your e-mail is forwarded to the imap server.

  4. Migrate your email.

  5. Change your mail client so that your e-mail remains on the imap server.

Q. Do I already have an imap server account?

A. After Oct 1, 2007, people who used incoming mail on fnalu will automatically be given imap server accounts. If they wish not to save their mail on the imap server, they will have to take steps to change their personal mail configurations. Mail is only supported on the imap servers. There is no restriction on reading mail or saving it other than on the imap servers, but that is not a supported method.

Q. If I want to get an imap server account before October 1, 2007, how do I apply for one?

A. Fill out the form

http://computing.fnal.gov/cd/forms/acctreq_form.html#accounts You will receive feedback indicating which imap server your account has been established, along with instructions on how to use it.
and select the box next to "Fermilab IMAP Server Account".

Q. How do I redirect incoming e-mails from FNALU to IMAP?

A. To make your mail go to the imap server instead of FNALU you have to change where your e-mail alias goes.

In this example, we'll show the account name "george" with mail going to "george@fnal.gov". This example also shows that "george" already has an imap account on imap server2.

If you go to the Fermilab e-mail web page


You will see some links under "Forwarding/Passwords"

First you should check to see where your mail currently is going

Then change it to go where you want

In this case, you would change it to go to george@imap server2.fnal.gov

If you do not remember your e-mail gateway password please call the helpdesk at ext. 2345 to have your email gateway password reset. Accounts have to be verified before a new gateway password is issued.

Just in case someone has e-mail pointing directly to your e-mail account on fnalu (such as george@fnalu.fnal.gov) you should change, or add, your .forward file in your home directory.

So, you would edit
and put in just one line

If you forward to an off-site address or other non-FNALU node, edit the .forward file appropriate to the address.

Q. Can my mail be migrated to the imap server?

A. You can only migrate mail from fnalu if you have been reading your mail and saving it to a folder. After it is in a folder, it has a certain format (mh, mbx, etc). The mail utility program works on many file formats. If you have not been saving your email to a folder, you will have to do so before you can migrate it to the imap server or save it to the AFS home or project path.

If you have not been saving it to a folder, your mail is in a file directory called /var/mail/username or /var/spool/mail/username and may be quite large in size.

The AFS home areas have a restriction of 500mb in size. If you think your home area will not hold your newly saved mail folders, please use the form http://computing.fnal.gov/cd/forms/fermi-afs-req.html to ask for a project area. Project areas have a quota that his larger than 500mb. Once your mail inbox file is saved into separate folders, you can proceed to the migration process.

Q. Why isn't there an automated way to migrate e-mail?

A. Because of the large variety of ways people read their e-mail, there is no one easy way to automate the migration. If the steps in this faq are not enough, contact the helpdesk for further help.

Q. How do I migrate my saved e-mail to the imap server?

A. Use the mailutil transfer utility on flxi07.fnal.gov, or use

If you have been reading e-mail on fnalu with either pine, exmh or some other mail client that saves to mh format files in folders, then you will be able to transfer your folders to your existing imap account. If you do not yet have an imap account obtain one first:


(and change your forwarding.)

Here are two examples of moving pine mbx and mh folders from an afs home area to an imap server account, where the user is mgreaney who has an imap server account on imap server1.fnal.gov, and wants to move a pine mh folder named “esh” and a pine mbx folder named “pinebox” to the imap server. The native format for pine is mbx.

1. Login to flxi07 (or flxi05). Set up your path if it is not setup yet.

    source /usr/local/etc/setups.csh

    setup setpath

    2. Set up the utility program, mailutil, that will migrate your files.

    setup mailutil v2006h_7

    (The file / afs/fnal.gov/ups/mailutil/v2006h_7/Linux/bin/mailutil is now in your path.)

    3. Determine the name of the mail folder you want to move. In this first example the file in the path /afs/fnal.gov/files/home/room1/mgreaney/mail, is a folder in pine named “pinebox”. Note that it has no extension.

    4. In the command below, the options -v -kw mean to show verbose output, create a copy and do not delete the original folder.

    mailutil transfer -v -kw mail/pinebox "{imap server1.fnal.gov/ssl/USER=mgreaney}"

    (this command should be all on one line, and the braces are surrounded by quotes because mgreaney's account uses a tcsh shell. Omit the quotes if you have a ksh or bash shell for your login.)

    here is the second example for a mh folder in an afs directory named /afs/fnal.gov/files/home/room1/mgreaney/Mail/esh.

    mailutil transfer -v -kw \#mh/esh "{imap server1.fnal.gov/ssl/USER=mgreaney}"

    for other mail formats see url:


    5. See the output (these look the same for either mh or mbx transfers) which will ask you for your imap password:

    [Trying IP address []]

    {imap1.fnal.gov/imap/user=mgreaney} password:

    Listing mailboxes...

    Copying #mh/esh

    => {imap1.fnal.gov:993/imap/notls/ssl/user="mgreaney"}_mh/esh


    #mh/esh [1 message(s)] => {imap1.fnal.gov:993/imap/notls/ssl/user="mgreaney"}_mh/esh

    [[APPENDUID 1185907284 1] Completed]

    [Ok 1 messages(s)]

    [LOGOUT received]

6. Login to your imap account and check that the folder has been transferred:

example of file moved onto imap server1 account

example showing timestamps preserved in the copy

7. Once you have made sure the folder and contents were transferred, you can remove the folder from your afs path as you will only be maintaining your mail on the imap server.

There is also the possibility of transferring all of the folders at once by not putting any folder names in the command. Here is an example:

mailutil transfer -v -kw \mail/ "{imap server1.fnal.gov/ssl/USER=mgreaney}"

This method should get the majority or all of your folders transferred.

8. If you want to continue using pine to read your mail but save the mail on the imap server, you will need to modify your pine configuration file.

    First make a backup copy of your .pinerc file.

    cp .pinerc pinerc.20070820

    Then review these web page for directions on how to make the imap server the sole repository of your mail.


    http://computing.fnal.gov/email/faq/index.html#imap In this link you will have to scroll down the page to the section on pine.

If you are not using pine or exmh and want to move your folders to your imap account, please contact the helpdesk at ext. 2345 or fill out the form at http://helpdesk.fnal.gov.

Q. What if my folder has a name that contains spaces? Will that get
transferred by the mail transfer utility?
A. No, if you have a folder that has spaces in its name, the mail transfer
utility will treat each separate word as a folder name. Use the pine
configure utility to move the folder to a new name with no spaces in the
title and then you can transfer the folder.

Q. What happens to cron mail on fnalu?

A. Cron jobs will still issue mail on completion of the cron task, but the
mail from the cron job will only work outbound from FNALU nodes. Users should
take care that they do not have a .forward file containing the name of any
FNALU node. After Oct. 1, 2007, a .forward file like this, george@fsui02.fnal.gov, will not work as no incoming mail to FNALU nodes will be accepted. The
.forward file in this example should be changed to george@fnal.gov, or to a destination that does accept incoming e-mail.

Here is another example of what users can do to change their cron jobs so that they still receive mail from them.
Date: Wed, 26 Sep 2007 13:28:57 -0500
From: Robert Hatcher
To: linux-users@fnal.gov
Subject: mail from cron and FNALU inbound e-mail

FNALU inbound e-mail is scheduled to turn of on Oct 1st. The question
arose at the Unix Users Meeting about what do do about mail sent by
cron running on FNALU nodes. The solution is to put the following
lines at the top of your crontab:
For further info see "man -S 5 crontab".

For assistance, contact Help Desk, helpdesk@fnal.gov
Information compiled and maintained by dss-est@fnal.gov ; last modified on Jun 26, 2007.
(Address comments about page to helpdesk@fnal.gov.)