RFC 2061

IMAP4 Compatibility with IMAP2bis

πŸ“… published December 1996, from ietf

IMAP4 COMPATIBILITY WITH IMAP2BIS ✨

Network Working Group πŸŽ€ Request for Comments: 2061 πŸ¦‹ Category: Informational πŸ’œ December 1996

Okay bestie, the title block first πŸ’… This one is from Mark R. Crispin at the University of Washington, filed as Informational in December 1996. It doesn't list anything it obsoletes or updates, so it's just a standalone helper doc 🧚

Status of this Memo 🌸

This memo gives information to the Internet community πŸ’– It is NOT a standard of any kind, and distribution is totally unlimited ✨

Introduction πŸ¦‹

Okay so IMAP has been through a bunch of revisions and variants in its 10-year history 😭 Most of them are either extinct or super rare. Several undocumented variants, plus the ones in RFC 1064, RFC 1176, and RFC 1203, are basically in that bin πŸ—‘οΈπŸ’€

Now, IMAP2bis is the one that's still everywhere, no cap πŸ”₯ It's been widely shipped with the Pine mailer, but the annoying part is there's no definitive doc describing it πŸ™ˆ This doc is meant to be read together with RFC 1176 and the newest IMAP4 spec (RFC 2060), so implementers can build an IMAP4 client or server that plays nicely with the older software 🫢

Nothing in this document is required by the IMAP4 spec. Each implementer gets to decide for themselves whether their implementation should fail when it runs into old software πŸ‘‘

IMAP4 has also been updated since RFC 1730, so if you want to interoperate with both RFC 1730 and RFC 2060, read both docs πŸ“šβœ¨

This info is NOT complete, bestie πŸ˜… It reflects what people currently know about server and client implementations, plus some "folklore" from the protocol's evolution 🧚 It's NOT a guide for every IMAP variant, just the old one you're most likely to bump into. For other old variants, check out RFC 1732 🌈

IMAP4 client interoperability with IMAP2bis servers πŸ’œ

Quick check: to see if a server supports IMAP4, just try the CAPABILITY command πŸ” An OK response tells you which IMAP4 variant(s) the server supports ✨

If the client doesn't find any of its known variants in that response, it should treat the server as IMAP2bis. A BAD response means the server is IMAP2bis or older πŸ’…

Most IMAP4 features exist in IMAP2bis too, with a few exceptions πŸŽ€

  • CAPABILITY command: Its absence means the server is IMAP2bis (or older) πŸ™ˆ
  • AUTHENTICATE command.: Use the LOGIN command instead πŸ”‘
  • LSUB, SUBSCRIBE, and UNSUBSCRIBE commands: No direct equivalent here 😭 IMAP2bis had a thing called "bboards," which IMAP4 doesn't have. RFC 1176 handled them with the BBOARD and FIND BBOARDS commands. IMAP2bis added FIND ALL.BBOARDS, SUBSCRIBE BBOARD, and UNSUBSCRIBE BBOARD. It's recommended that none of these get implemented in new software, including servers that still support old clients 🚫
  • LIST command: Use FIND ALL.MAILBOXES instead. It has a similar syntax and response to the FIND MAILBOXES command from RFC 1176. FIND MAILBOXES probably won't give you much useful info πŸ€·β€β™€οΈ
  • * in a sequence: Use the number of messages in the mailbox from the EXISTS unsolicited response πŸ”’
  • SEARCH extensions (character set, additional criteria): Rewrite the search using only RFC 1176 syntax. That might mean doing several searches to get what you want πŸ”Ž
  • BODYSTRUCTURE fetch data item: Use the non-extensible BODY data item 🧩
  • body sections HEADER, TEXT, MIME, HEADER.FIELDS, HEADER.FIELDS.NOT: Only use body section numbers πŸ”’
  • BODY.PEEK[section]: Use BODY[section] and manually clear the \Seen flag when needed πŸ™ˆ
  • FLAGS.SILENT, +FLAGS.SILENT, and -FLAGS.SILENT store data items: Use the non-SILENT versions and ignore the untagged FETCH responses that come back πŸ—‘οΈ
  • UID fetch data item and the UID commands: No functional equivalent 😭
  • CLOSE command: No functional equivalent either πŸ’€

In IMAP2bis, the TRYCREATE special information token gets sent as its own unsolicited OK response instead of living inside the NO response ✨

Also, IMAP2bis is ambiguous about whether flags or internal dates are preserved on COPY. There's no way to know what the server actually does 🫠

IMAP4 server interoperability with IMAP2bis clients πŸ¦‹

The only real interop problem between an IMAP4 server and a well-written IMAP2bis client is how "\" is handled in quoted strings 😀 The fix is simple: if "\" or <"> shows up inside a string, use literals instead of quoted strings 🫢

Security Considerations πŸ”

Okay, bestie, I'm not gonna lie, this part is short 😭 This memo does NOT discuss security issues at all. Be careful out there πŸ’€

Author's Address πŸ’Œ

Mark R. Crispin
Networks and Distributed Computing
University of Washington
4545 15th Aveneue NE
Seattle, WA  98105-4527

Phone: (206) 543-5762
EMail: MRC@CAC.Washington.EDU

That's the whole RFC, periodt! πŸŒˆπŸ‘‘πŸ’–

πŸ“¦ where this page comes from