CyrusMove

From Dracula's Wiki

Moving Cyrus to a new server

This task isn't this easy as one might think, but not to hard as other might be afraid of ...
This little howto is suposed to help others save time searching the cyrus mailinglist ( which is huge ) so I will just write some things I) found in the mailinglists and some of my own experience.

  • export the mailboxlist to a text file
su - cyrus -c "/usr/sbin/ctl_mboxlist -d" > mboxlist
  • copy this file to the new server and your complete cyrus partition
grep /etc/imapd.conf -e partition-default
partition-default: /var/spool/cyrus/mail

so in my case the partition is in /var/spool/cyrus/mail so I would have to copy my completet /var/spool/cyrus/ directory to the new server.

  • restore your cyrus mailboxes on the new server and reconstruct
cat mboxlist | su - cyrus -c "/usr/sbin/ctl_mboxlist -u"
su - cyrus -c "/usr/sbin/cyrreconstruct
  • copy your seen data to the new server else all mails are unread !
grep /etc/imapd.conf -e configdirectory
configdirectory: /var/lib/cyrus

in my case the seen data is in the configdirectory/domain ( /var/lib/cyrus/domain ) don't copy the complete configdirectory if you have compiled cyrus with different berkely versions, this won't work. Thank good the seendata is not in berkely format :)

Now everything should work again, try to login over cyradm with a admin user and check the mailboxes, dont forget to set the adminusers in imapd.conf (like I did ) or else you will waste time wondering why everything works except that you can't see any mailboxes with cyradm.

Atention

This howto doesn't include the sieve scripts which I forgot. I recreated some of them manualy without copying it.


Credits:

  • Balazs Pocze for the litle instruction for reconstruction
  • Casper for helping me find the missing admin problem.