about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:05:05 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit8af34015e9aa94e5ae4ae9e9fd2c4d155453ac94 (patch)
tree8c177a0c2baa04b96ef1839dd2da899fb5d97a89 /t
parentf1f7030566b17f596e2d6083047535ddd9b94e8c (diff)
downloadpublic-inbox-8af34015e9aa94e5ae4ae9e9fd2c4d155453ac94.tar.gz
While selecting a mailbox is done case-insensitively, "INBOX" is
special for the LIST command, according to RFC 3501 6.3.8:

> The special name INBOX is included in the output from LIST, if
> INBOX is supported by this server for this user and if the
> uppercase string "INBOX" matches the interpreted reference and
> mailbox name arguments with wildcards as described above.  The
> criteria for omitting INBOX is whether SELECT INBOX will
> return failure; it is not relevant whether the user's real
> INBOX resides on this or some other server.

Thus, the existing news.public-inbox.org convention of naming
newsgroups starting with "inbox." needs to be special-cased to
not confuse clients.

While we're at it, do not create ".0" for dummy newsgroups if
they're selected, either.
Diffstat (limited to 't')
-rw-r--r--t/imapd.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/imapd.t b/t/imapd.t
index 233be9f2..c691e1a9 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -101,13 +101,13 @@ like($raw[0], qr/\A\*\x20STATUS\x20inbox\.i1\.$first_range\x20
 like($raw[1], qr/\A\S+ OK /, 'finished status response');
 
 my @orig_list = @raw = $mic->list;
-like($raw[0], qr/^\* LIST \(.*?\) "\." inbox/,
+like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/,
         'got an inbox');
 like($raw[-1], qr/^\S+ OK /, 'response ended with OK');
 is(scalar(@raw), scalar(@V) + 4, 'default LIST response');
 @raw = $mic->list('', 'inbox.i1');
 is(scalar(@raw), 2, 'limited LIST response');
-like($raw[0], qr/^\* LIST \(.*?\) "\." inbox/,
+like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/,
                 'got an inbox.i1');
 like($raw[-1], qr/^\S+ OK /, 'response ended with OK');