RFC 2062
Internet Message Access Protocol - Obsolete Syntax
Internet Message Access Protocol - Obsolete Syntax β¨
Okay bestie, let's get into RFC 2062 π It's called Internet Message Access Protocol - Obsolete Syntax, written by M. Crispin at the University of Washington π It's Informational, dated December 1996, and it came out of the Network Working Group πΈ Nothing is listed as obsoleted or updated up top, so there's nothing to chase there β¨
Part 1 of 2 π
Status of this Memo πΈ
This memo provides information for the Internet community π It does not specify an Internet standard of any kind, and distribution of this memo is unlimited π¦
Abstract π
So this doc describes obsolete syntax that IMAP4 implementations might bump into when they're dealing with older versions of the Internet Mail Access Protocol π IMAP4 implementations MAY implement this syntax in order to maximize interoperability with older implementations π«Ά
It also repeats info from earlier documents, most notably RFC 1176 and RFC 1730 π
Obsolete Commands and Fetch Data Items π§
Okay so these commands are OBSOLETE (yes, all caps, it's serious π€) It is NOT required to support any of these commands or fetch data items in new server implementations π They're only documented here for implementors who might want to support them so old client implementations still work π
The section headings here line up with where they'd sit in the main document if they weren't obsoleted, so you can still find your way around πΊοΈ
6.3.OBS.1. FIND ALL.MAILBOXES Command πΈ
Arguments: mailbox name with possible wildcards
Data: untagged responses: MAILBOX
Result: OK - find completed
NO - find failure: can't list that name
BAD - command unknown or arguments invalid
The FIND ALL.MAILBOXES command returns a subset of names from the complete set of all names available to the user β¨ It returns zero or more untagged MAILBOX replies π
The mailbox argument is similar to the one for LIST with an empty reference, except that the characters % and ? match a single character π¦
Example:
C: A002 FIND ALL.MAILBOXES *
S: * MAILBOX blurdybloop
S: * MAILBOX INBOX
S: A002 OK FIND ALL.MAILBOXES completed
6.3.OBS.2. FIND MAILBOXES Command π
Arguments: mailbox name with possible wildcards
Data: untagged responses: MAILBOX
Result: OK - find completed
NO - find failure: can't list that name
BAD - command unknown or arguments invalid
The FIND MAILBOXES command returns a subset of names from the set of names the user has declared as being "active" or "subscribed" π It returns zero or more untagged MAILBOX replies π The mailbox argument is similar to the one for LSUB with an empty reference, except that the characters % and ? match a single character π
Example:
C: A002 FIND MAILBOXES *
S: * MAILBOX blurdybloop
S: * MAILBOX INBOX
S: A002 OK FIND MAILBOXES completed
6.3.OBS.3. SUBSCRIBE MAILBOX Command π¦
Arguments: mailbox name
Data: no specific data for this command
Result: OK - subscribe completed
NO - subscribe failure: can't subscribe to that name
BAD - command unknown or arguments invalid
The SUBSCRIBE MAILBOX command is identical in effect to the SUBSCRIBE command π A server that implements this command must be able to distinguish between a SUBSCRIBE MAILBOX command and a SUBSCRIBE command with a mailbox name argument of "MAILBOX" π€― That's the whole plot twist, babe π
Example:
C: A002 SUBSCRIBE MAILBOX #news.comp.mail.mime
S: A002 OK SUBSCRIBE MAILBOX to #news.comp.mail.mime
completed
C: A003 SUBSCRIBE MAILBOX
S: A003 OK SUBSCRIBE to MAILBOX completed
6.3.OBS.4. UNSUBSCRIBE MAILBOX Command π₯
Arguments: mailbox name
Data: no specific data for this command
Result: OK - unsubscribe completed
NO - unsubscribe failure: can't unsubscribe that name
BAD - command unknown or arguments invalid
The UNSUBSCRIBE MAILBOX command is identical in effect to the UNSUBSCRIBE command π« A server that implements this command must be able to distinguish between an UNSUBSCRIBE MAILBOX command and an UNSUBSCRIBE command with a mailbox name argument of "MAILBOX" π Same energy as the subscribe one, periodt π
Example:
C: A002 UNSUBSCRIBE MAILBOX #news.comp.mail.mime
S: A002 OK UNSUBSCRIBE MAILBOX from #news.comp.mail.mime
completed
C: A003 UNSUBSCRIBE MAILBOX
S: A003 OK UNSUBSCRIBE from MAILBOX completed
6.4.OBS.1 PARTIAL Command π§
Arguments: message sequence number
message data item name
position of first octet
number of octets
Data: untagged responses: FETCH
Result: OK - partial completed
NO - partial error: can't fetch that data
BAD - command unknown or arguments invalid
Okay so PARTIAL is basically FETCH, but with a glow-up: only the number of octets you ask for comes back, starting from the octet you pick π Only a single message can be fetched at a time πΈ The first octet of a message, and so the minimum starting octet, is octet 1 β¨
The FETCH items that are valid for PARTIAL are RFC822, RFC822.HEADER, RFC822.TEXT, BODY[<section>], plus any .PEEK forms of these π¦
If a partial fetch tries to read past the end of the text, it gets truncated as appropriate π«Ά And if the starting octet is past the end of the text, you get an empty string back π«₯
The data comes back with the FETCH response, and there's no indication of the range of the partial data in that response π You also can't stream multiple PARTIAL commands for the same data item without processing and synchronizing at each step, since streamed commands may run out of order π΅βπ« Not a vibe π
There's no requirement that partial fetches follow any sequence π For example, if a partial fetch of octets 1 through 10000 breaks in an awkward spot for BASE64 decoding, it is permitted to continue with a partial fetch of 9987 through 19987, etc. π Flexible queen behavior π
The handling of the \Seen flag is the same as in the associated FETCH command π
Example:
C: A005 PARTIAL 4 RFC822 1 1024
S: * 1 FETCH (RFC822 {1024}
S: Return-Path: <gray@cac.washington.edu>
S: ...
S: ......... FLAGS (\Seen))
S: A005 OK PARTIAL completed
6.4.5.OBS.1 Obsolete FETCH Data Items π
The following FETCH data items are obsolete π₯Ή
BODY[<...>0] A body part number of 0 is the [RFC-822] header of
the message. BODY[0] is functionally equivalent to
BODY[HEADER], differing in the syntax of the
resulting untagged FETCH data (BODY[0] is
returned).
RFC822.HEADER.LINES <header_list>
Functionally equivalent to BODY.PEEK[HEADER.LINES
<header_list>], differing in the syntax of the
resulting untagged FETCH data (RFC822.HEADER is
returned).
RFC822.HEADER.LINES.NOT <header_list>
Functionally equivalent to
BODY.PEEK[HEADER.LINES.NOT <header_list>],
differing in the syntax of the resulting untagged
FETCH data (RFC822.HEADER is returned).
RFC822.PEEK Functionally equivalent to BODY.PEEK[], except for
the syntax of the resulting untagged FETCH data
(RFC822 is returned).
RFC822.TEXT.PEEK
Functionally equivalent to BODY.PEEK[TEXT], except
for the syntax of the resulting untagged FETCH data
(RFC822.TEXT is returned).
Formal Syntax of Obsolete Commands and Responses β¨
okay so here's the grammar bit π
every obsolete rule that ends in _old gets tacked onto its buddy in the main formal syntax, like a little accessory π for example, command_auth_old adds the FIND command to command_auth. iconic, right?
command_auth_old ::= find
command_select_old
::= partial
date_year_old ::= 2digit
;; (year - 1900)
date_time_old ::= <"> date_day_fixed "-" date_month "-" date_year
SPACE time "-" zone_name <">
find ::= "FIND" SPACE ["ALL."] "MAILBOXES" SPACE
list_mailbox
fetch_att_old ::= "RFC822.HEADER.LINES" [".NOT"] SPACE header_list /
fetch_text_old
fetch_text_old ::= "BODY" [".PEEK"] section_old /
"RFC822" [".HEADER" / ".TEXT" [".PEEK"]]
msg_data_old ::= "COPY" / ("STORE" SPACE msg_att)
partial ::= "PARTIAL" SPACE nz_number SPACE fetch_text_old SPACE
number SPACE number
section_old ::= "[" (number ["." number]) "]"
subscribe_old ::= "SUBSCRIBE" SPACE "MAILBOX" SPACE mailbox
unsubscribe_old ::= "UNSUBSCRIBE" SPACE "MAILBOX" SPACE mailbox
zone_name ::= "UT" / "GMT" / "Z" / ;; +0000
"AST" / "EDT" / ;; -0400
"EST" / "CDT" / ;; -0500
"CST" / "MDT" / ;; -0600
"MST" / "PDT" / ;; -0700
"PST" / "YDT" / ;; -0800
"YST" / "HDT" / ;; -0900
"HST" / "BDT" / ;; -1000
"BST" / ;; -1100
"A" / "B" / "C" / "D" / "E" / "F" / ;; +1 to +6
"G" / "H" / "I" / "K" / "L" / "M" / ;; +7 to +12
"N" / "O" / "P" / "Q" / "R" / "S" / ;; -1 to -6
"T" / "U" / "V" / "W" / "X" / "Y" ;; -7 to -12
Security Considerations π
okay, real talk for a sec π₯Ί this memo does not discuss security issues at all. not a single one. so if you're looking for threat models in here, you're gonna be disappointed bestie π
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
π¦ where this page comes from
- ietf: rfc2062 1996-12
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms