implement IMAP CREATE-SPECIAL-USE extension for the mailbox create command, part of rfc 6154

we already supported special-use flags. settable through the webmail interface,
and new accounts already got standard mailboxes with special-use flags
predefined. but now the IMAP "CREATE" command implements creating mailboxes
with special-use flags.
This commit is contained in:
Mechiel Lukkien
2025-02-19 20:39:26 +01:00
parent 7288e038e6
commit dcaa99a85c
15 changed files with 167 additions and 58 deletions

View File

@ -28,7 +28,7 @@ func TestDelete(t *testing.T) {
tc.client.Subscribe("x")
tc.transactf("no", "delete x") // Subscription does not mean there is a mailbox that can be deleted.
tc.client.Create("a/b")
tc.client.Create("a/b", nil)
tc2.transactf("ok", "noop") // Drain changes.
tc3.transactf("ok", "noop")
@ -53,12 +53,12 @@ func TestDelete(t *testing.T) {
)
// Let's try again with a message present.
tc.client.Create("msgs")
tc.client.Create("msgs", nil)
tc.client.Append("msgs", nil, nil, []byte(exampleMsg))
tc.transactf("ok", "delete msgs")
// Delete for inbox/* is allowed.
tc.client.Create("inbox/a")
tc.client.Create("inbox/a", nil)
tc.transactf("ok", "delete inbox/a")
}