Difference between revisions of "Move mbox Calmail"

From UCB Math Wiki
Jump to: navigation, search
(Moving mailboxes to Calmail)
(Moving mailboxes to Calmail)
Line 16: Line 16:
 
''mbox2imap -i NEWMBOX -u james@math.berkeley.edu -s calmail.berkeley.edu OLDMBOX''
 
''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.   
+
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, if you move your mail with a command line tool, Mac Mail will display the "Date Received" of all the messages in NEWMBOX as the date you moved them.  However, the "Date Sent" will still be correct.  This problem doesn't seem to affect other mail clients.
  
  
 
--[[User:SteveSizemore|Steve Sizemore - Unix System Manager]] 04:09, 24 March 2009 (UTC)
 
--[[User:SteveSizemore|Steve Sizemore - Unix System Manager]] 04:09, 24 March 2009 (UTC)

Revision as of 08:25, 26 March 2009

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, if you move your mail with a command line tool, Mac Mail will display the "Date Received" of all the messages in NEWMBOX as the date you moved them. However, the "Date Sent" will still be correct. This problem doesn't seem to affect other mail clients.


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