Posted: 2014-07-25 10:46:27 by Alasdair Keyes
I'm in the middle of migrating systems at the moment, part of which involves migrating mailboxes between seperate systems, the source system is using Maildir format mailbox and the destination is using Cyrus, so I'm unable to just copy the files from the filesystem.
Both have IMAP access so I can use the fantastic imapsync util to help http://imapsync.lamiral.info/. I hadn't come across it before, but if you want a basic sync of mailboxes, the following will do what you want. Obviously, use IMAPS as there's no reason not to..
imapsync --host1 srchost.com --port1 993 --user1 dstuser --password1 pass1 --host2 dsthost.com --port2 993 --user2 srcuser --password2 pass2 --pidfile '/firstname.lastname@example.org' --nofoldersizes --noreleasecheck --subscribe_all --delete2 --ssl1 --ssl2 --addheader
If you every need to perform any kind of migration, this will make your life a lot easier.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
I'm now available for IT consultancy and software development services - Cloudee LTD.
Happy user of Digital Ocean (Affiliate link)