Move mbox Calmail

From UCB Math Wiki
Revision as of 17:04, 25 March 2009 by Ogus (talk | contribs) (Moving mailboxes to Calmail)
Jump to: navigation, search

Moving mailboxes to Calmail

First, you must have a calmail account, with a valid password.

Your old mail (on mail.math.berkeley.edu) is still available via IMAP, and the new server (calmail.berkeley.edu) is also running IMAP. There is a good chance that you'll be able to move your old mail to your new calmail account simply by copying from within your mail client.

In the case where there is some problem with the old mail folder (e.g. the size is too large), you can use unix command line tools to manipulate the folders.

On Solaris, there is a program called movemail which will do the job.

On blue2 (FreeBSD) and on login.math, the functionally equivalent command is called mbox2imap. As an example, if your login name is james, and you want to move your mail spool (/var/mail/james) to the INBOX folder on your new calmail account, the command syntax is

mbox2imap -u james@math.berkeley.edu -s calmail.berkeley.edu /var/mail/james

If you want to upload to a folder other than MBOX, use the "-i" option to give it a name - e.g. to upload OLDMBOX to a folder on calmail named NEWMBOX

mbox2imap -i NEWMBOX -u james@math.berkeley.edu -s calmail.berkeley.edu OLDMBOX

Note that the NEWMBOX must already exist on the remote server, or mbox2imap will fail. You can create it ahead of time with your email client. OLDMBOX should be the pathname to the name of the mailbox folder you want to move. Unfortunately this process will set the "date received" of all the messages in OLDMBOX to the date you moved them. However the "date sent" will still be correct.


--Steve Sizemore - Unix System Manager 04:09, 24 March 2009 (UTC)