From: "Craig White" <craigwhite@xxxxxxxxxxx>
that is a really low tech solution that's workable for one mailbox. imapsync is a terrific tool. copies entire user stuff from one imap server to another and preserves the IMAP flags. imapsync is simple to download, compile, install & configure. If however the server/user id's are the same on both machines, you could probably just rsync or tar a copy across the 2 computers.
Some of the IMAP servers place the files in a jail. So I suggested the slightly harder but will work in any case. I use dovecot not in a jail or any other nonsense (such as Cyrus IMAP) so the copy is easy and straightforward - as long as you look in the right place. (On my setup it is "$HOME/mail" in general.) {^_-}