Hi,
courier-imap fails to RENAME folders when a folder has subfolders.
Subfolders will not be renamed when the top level folder is renamed.
RFC2060, 6.3.5. says:
if the name has inferior hierarchical names, then the inferior
hierarchical names MUST also be renamed. For example, a rename of
"foo" to "zap" will rename "foo/bar" (assuming "/" is the
hierarchy delimiter character) to "zap/bar".
The following is the output of the attachet renamebug.sh script + the
Commands inserted at the right place.
* PREAUTH Ready.
L001 CREATE INBOX.a
L001 OK "INBOX.a" created.
L002 CREATE INBOX.a.a
L002 OK "INBOX.a.a" created.
L004 RENAME INBOX.a INBOX.b
L004 OK Folder renamed.
L005 LIST "" "*"
* LIST (\HasNoChildren) "." "INBOX.Trash"
* LIST (\HasNoChildren) "." "INBOX.a.a"
* LIST (\HasNoChildren) "." "INBOX.b"
* LIST (\Unmarked \HasChildren) "." "INBOX"
* LIST (\Noselect \HasChildren) "." "INBOX.a"
L005 OK LIST completed.
* BYE Courier-IMAP server shutting down
KDONE OK LOGOUT completed
I would expect INBOX.a.a to be INBOX.b.a after the RENAME.
Regards,
Lars Uffmann
#!/bin/sh
rm -rf confmdtest
../maildir/maildirmake confmdtest || exit 1
env MAILDIR=confmdtest ./imapd <<EOF 2>/dev/null
L001 CREATE INBOX.a
L002 CREATE INBOX.a.a
L004 RENAME INBOX.a INBOX.b
L005 LIST "" "*"
KDONE logout
EOF