mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 10:34:40 +03:00
imapserver: only send OLDNAME in LIST responses when IMAP4rev2 was enabled
OLDNAME is included in IMAP4rev2, but not in IMAP4rev1. it is also included in the NOTIFY extension, but we don't implement that yet. found by Damian Poddebniak with https://github.com/duesee/imap-flow, thanks!
This commit is contained in:
@ -36,10 +36,15 @@ func TestCreate(t *testing.T) {
|
||||
|
||||
// ../rfc/9051:1934
|
||||
tc.transactf("ok", "create mailbox/")
|
||||
tc.xuntagged(imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox", OldName: "mailbox/"})
|
||||
tc.xuntagged(imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox"})
|
||||
|
||||
// OldName is only set for IMAP4rev2 or NOTIFY.
|
||||
tc.client.Enable("imap4rev2")
|
||||
tc.transactf("ok", "create mailbox2/")
|
||||
tc.xuntagged(imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox2", OldName: "mailbox2/"})
|
||||
|
||||
tc2.transactf("ok", "noop")
|
||||
tc2.xuntagged(imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox"})
|
||||
tc2.xuntagged(imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox"}, imapclient.UntaggedList{Flags: []string{`\Subscribed`}, Separator: '/', Mailbox: "mailbox2"})
|
||||
|
||||
// If we are already subscribed, create should still work, and we still want to see the subscribed flag.
|
||||
tc.transactf("ok", "subscribe newbox")
|
||||
|
Reference in New Issue
Block a user