Not sure if this is a bug or not, but it seems to be. If forum feedback concurs, I'll create a patch.

In org.jboss.mail.mailbox.MailboxServiceImpl.moveFolder(...) [line 824], there appears to be a minor typo with the moveFolder function.

Below is the current version of the function. 'folder' is the folder to be moved, 'target' is the new parent folder, and name is the name of the folder. The function loads 'folder' by id, then loads the target folder by id. It then (assuming the folder and target aren't the same) removes 'folder' from its parent. Next, it appers to add the target folder (i.e., the new parent) to itself via the call "t.addFolder(t)" ---> I think this is the bug.