Moving mail to a new machine
Gordon
gmcrhce at cox.net
Wed Oct 15 12:06:41 EDT 2003
> Gordon wrote:
>
>> I previously had my imap server running on one machine that I had set
>> up myself. I had several folders beside my inbox. I recently built a
>> new machine with a new version of Redhat and I've built and installed
>> the latest version of cyrus.
>>
>> I have cyrus running and configured but I'm having a heck of a time
>> getting to my old mail files. What I've done is copy the whole
>> directory tree of my mail files to the directory
>> /var/spool/imap/g/user/gmc. I've gone into cyradm and created a
>> mailbox called user.gmc and set the acl to write. I use mozilla for
>> email and I was able to set it up and I can now see the emails from my
>> old inbox. The problem is that I can't figure out how to get to the
>> email that are in the other folders. They're in directories under the
>> directory stated above. Can anyone help with this bit? Was there an
>> easier way to do this?
>>
>> Gordon
>>
>
>
I finally got it worked out yesterday and this is what I did. It's not
pretty, pretty ugly in fact, but it appears to have worked. Remember
that the machine I'm moving my mail to I a brand new installation so I
have the luxury of being able to break things and try them again.
1. In cyradm I ran "cm user.gmc" to create my mailbox.
2. In mozilla mail, I added an account to access the imap server. I was
able to see the new inbox so that was well.
3. Also in mozilla mail, I started creating folders and subfolders to
match the directory structure that I had on my old machine. I now had a
directory /var/spool/imap/g/user/gmc with a bunch of subdirs for the
folders.
4. Shutdown the cyrus server. May or may not be necessary, but I didn't
want to corrupt anything by having cyrus running at this point.
5. Cd to /var/spool/imap/g/user/gmc and run "rsync -av -e ssh
oldmachine:/var/spool/imap/user/gmc/ .". This operation copied the mail
files and cyrus metafiles from the old machine to the new machine. Since
I had CAREFULLY created the directory tree already using mozilla mail
and MADE SURE the directory tree was the same between the old machine
and new machine, I now had populated mail folders.
6. Restart cyrus and check that I could see the messages in mozilla.
More information about the Info-cyrus
mailing list