Questions about moving mailboxes to a new backend in a murder environment

Steeve Gagnon S.Gagnon at USherbrooke.ca
Fri Aug 10 13:23:31 EDT 2007


Hello there !

We are using Cyrus 2.2.12 with Red hat server 4 in a murder 
configuration (Nombers of users is over thousand). Recently, I added a 
new backend and succesfully moved mailboxes on it. But some problems 
occured which make me believe that moving mailboxes can't be 100% safe. 
I tried with RENAME and XFER cammands. I also tried the approach of 
deleting the mailbox and moving it to the new server via "scp" and 
rebuild it (yes, I took care of the "seen", "sub" and "quota" files). 
Unfortunatly none of these methods seems to be 100% safe, sometimes 
problems may occur. So after all theses tests, I decided to you some 
questions...

1- When I move a mailbox to another backend, some informations about the 
"seen states" are lost.
For example, if userA gives access to userB to one of his folders : 
After I moved userA's mailbox, userB will see all mails in the shared 
folder has unseen.
1a- Is it normal ?
1b- This problem occurs no matter what method I use : RENAME, XFER. Is 
there a way to make sure the problem can't append ? Note that I don't 
rebuild the mailbox after the move... because I considere I dont need to do.
1c- Will this happen for shared mailboxes (bb) ? I didn't try yet.

2- The file "cyrus.index"...
I know some informations are written in this file.  Is there a way to 
read this file and understand what it contains.

3- Sometimes, when doing a "RENAME" or "XFER", I get the error message 
"the server denied the operation". I don't know where the error message 
come from (what happened so that message was printed). Does anybody know 
? Is there a way to avoid this problème ?


That's it ! The rest of the mail is for information (for those who are 
interessed)

Thanks !

My goal :
Create a script that gives me the opportunity to move any box safely. I 
could then schedule it to run at night (or in the early morning). The 
script is almost created. This is what it does :
1- Do a "lsof  | grep mailboxName" to make sure the mailbox isn't in use
2- Lock user from using his mailbox (it doesn't check if folders are shared)
3- Redirect delivery to a temporary mailbox (I check the mailbox 
manually after the move)
4- Do a backup of the mailbox
5- Move the mailbox to the new server
6- If no error happenned
  6a- Restore delivery
  6b- Unlock user

Move (step 5) can be done via RENAME or XFER. This is what I do when I 
move a mailbox via SCP (step 5).
1- Copy (cp -a) mailbox in a temporary zone. Files copied are
1a- The mailbox itself
1b- userName.seen (which is also converted from skiplist to flat)
1c, userName.sub
1d- the quota file for that user
1e - Some other files useful for the operation (ex. : a file that 
contains the hash letter, ...)
2- Delete mailbox ("sam syradm mailbox all" then  "dm mailbox")
3- Copy files in the new server (in a temporary zone)
4- Restore files in the directory structure (where the mailbox will be)
5- Re-convert seen file in skiplist and copy it where it should be
6- Restore userName.sub where it should be
7- Restore the quota file
8- Do "/.../reconstruct -f --partition zzz user/userName"
9- Do "/.../quota f user/userName"



More information about the Info-cyrus mailing list