Class Rename.

Inherits Command

Renames a mailbox (RFC 3501 section 6.3.5) and its children.

If the mailbox is the user's inbox, we create create a new inbox after moving the old one, and ensure that mail is delivered to the new inbox henceforth, not to the renamed old one. This is more or less what RFC 3501 section 6.3.5 says.

It's not clear what should happen if someone has inbox selected while it's being renamed. In our code, the renamed mailbox remains selected, and the new inbox is not selected.

There is a race condition here: we check that the user has permission to carry out the transaction, but the permission checking is not within the transaction that does the move. This seems to be insignificant - it can't be used to achieve anything.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.