mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 03:26:37 +03:00
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:
@ -72,6 +72,14 @@ func TestCreate(t *testing.T) {
|
||||
tc.transactf("no", `create "#"`) // Leading hash not allowed.
|
||||
tc.transactf("ok", `create "test#"`)
|
||||
|
||||
// Create with flags.
|
||||
tc.transactf("no", `create "newwithflags" (use (\unknown))`)
|
||||
tc.transactf("no", `create "newwithflags" (use (\all))`)
|
||||
tc.transactf("ok", `create "newwithflags" (use (\archive))`)
|
||||
tc.transactf("ok", "noop")
|
||||
tc.xuntagged()
|
||||
tc.transactf("ok", `create "newwithflags2" (use (\archive) use (\drafts \sent))`)
|
||||
|
||||
// UTF-7 checks are only for IMAP4 before rev2 and without UTF8=ACCEPT.
|
||||
tc.transactf("ok", `create "&"`) // Interpreted as UTF-8, no UTF-7.
|
||||
tc2.transactf("bad", `create "&"`) // Bad UTF-7.
|
||||
|
Reference in New Issue
Block a user