Thomas Reifferscheid writes:
Sam Varshavchik wrote:- create new maildir - copy mails from old maildir to new maildir - delete mails from old maildir - copy the acls from old maildir to new maildir - delete acsl from old maildir - delete old maildir - repeat for every subfolder of old maildir What do you think?How do you propose handling the situation of an error occuring in the middle of the move, and how do you intend to keep any other IMAP sessions from accessing either folder, while the migration is in progress?Error situation: For error situations it might be better to do the whole process like this: - check for create permissions new maildir - check for deletion permissions old folders, acls, mails - create new maildir - copy mails from old maildir to new maildir - copy the acls from old maildir to new maildir - repeat for every subfolder of old maildir - delete all old folders, alcs, mails. In case of an error in between inform the user: An error has occured: strerror(errno).
This is not acceptable. You cannot leave a partially-copied maildir in place.
Keeping another IMAP session from accessing either folder: lock the maildir, either do it folder by folder, during the copy process, which will be annoying for the case someone is accessing a particular folder, or lock them all in a row before doing actions. Inform the user: Folder foo is locked by user/ip/host and could not be locked. Do you think thats possible?
No, I don't think that's possible, not without a lot of work.
pgprr7OqSgGhh.pgp
Description: PGP signature
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Courier-imap mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
