User Tools

Site Tools


move-cyrus-folder

This procedure can be used to move a imap folder between users on a server (or between servers).

  • copy imap folder over.
  • chown all to cyrus:mail
  • make sure there's a cyrus.header file in there, (touch and chown it if not)
  • stop cyrus
  • /usr/lib/cyrus/reconstruct -rf user.newuser
  • start cyrus
  • fix ACL on new directories:
  • grab a directory listing one per line (find -type d), create a vim script to change each line to 2 lines, and do the following: for eg:
    • dam user.newuser.copied-directory.“subdirectory with spaces” olduser
    • sam user.newuser.copied-directory.“subdirectory with spaces” newuser lrswipkxtecda
  • replace slashes with dots in sub/subdirectories
  • escape quote marks ' → \'
  • paste the script into cryadm

dam = delete acl on mailbox, sam = set acl on mailbox

move-cyrus-folder.txt · Last modified: 2017/10/11 16:31 by snarg