]> Sergey Matveev's repositories - public-inbox.git/commit
imap: case-insensitive mailbox name comparisons
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:04:37 +0000 (07:04 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commit49175649b3e49cdd5f2ac857cb91e69a5b91a739
tree0d79deb03f67a58c2c1e6bcb5d75e004a6004e55
parent509c2cc25c8f21b4e1685de8b475629559c9b2aa
imap: case-insensitive mailbox name comparisons

IMAP RFC 3501 stipulates case-insensitive comparisons, and so
does RFC 977 (NNTP).  However, INN (nnrpd) uses case-sensitive
comparisons, so we've always used case-sensitive comparisons for
NNTP to match nnrpd behavior.

Unfortunately, some IMAP clients insist on sending "INBOX" with
caps, which causes problems for us.  Since NNTP group names are
typically all lowercase anyways, just force all comparisons to
lowercase for IMAP and warn admins if uppercase-containing
newsgroups won't be accessible over IMAP.

This ensures our existing -nntpd behavior remains unchanged
while being compatible with the expectations of real-world IMAP
clients.
lib/PublicInbox/IMAPD.pm
t/imap.t
t/imapd.t