draft-ietf-extra-imap4rev2-03.txt   draft-ietf-extra-imap4rev2-04.txt 
Network Working Group A. Melnikov, Ed. Network Working Group A. Melnikov, Ed.
Internet-Draft Isode Ltd Internet-Draft Isode Ltd
Obsoletes: 3501 (if approved) B. Leiba, Ed. Obsoletes: 3501 (if approved) B. Leiba, Ed.
Intended status: Standards Track Huawei Technologies Intended status: Standards Track Huawei Technologies
Expires: August 7, 2019 February 3, 2019 Expires: September 10, 2019 March 9, 2019
INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev2 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev2
draft-ietf-extra-imap4rev2-03 draft-ietf-extra-imap4rev2-04
Abstract Abstract
The Internet Message Access Protocol, Version 4rev2 (IMAP4rev2) The Internet Message Access Protocol, Version 4rev2 (IMAP4rev2)
allows a client to access and manipulate electronic mail messages on allows a client to access and manipulate electronic mail messages on
a server. IMAP4rev2 permits manipulation of mailboxes (remote a server. IMAP4rev2 permits manipulation of mailboxes (remote
message folders) in a way that is functionally equivalent to local message folders) in a way that is functionally equivalent to local
folders. IMAP4rev2 also provides the capability for an offline folders. IMAP4rev2 also provides the capability for an offline
client to resynchronize with the server. client to resynchronize with the server.
IMAP4rev2 includes operations for creating, deleting, and renaming IMAP4rev2 includes operations for creating, deleting, and renaming
mailboxes, checking for new messages, permanently removing messages, mailboxes, checking for new messages, permanently removing messages,
setting and clearing flags, RFC 5322 and RFC 2045 parsing, searching, setting and clearing flags, RFC 5322, RFC 2045 and RFC 2231 parsing,
and selective fetching of message attributes, texts, and portions searching, and selective fetching of message attributes, texts, and
thereof. Messages in IMAP4rev2 are accessed by the use of numbers. portions thereof. Messages in IMAP4rev2 are accessed by the use of
These numbers are either message sequence numbers or unique numbers. These numbers are either message sequence numbers or unique
identifiers. identifiers.
IMAP4rev2 does not specify a means of posting mail; this function is IMAP4rev2 does not specify a means of posting mail; this function is
handled by a mail submission protocol such as RFC 6409. handled by a mail submission protocol such as RFC 6409.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 7, 2019. This Internet-Draft will expire on September 10, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 18 skipping to change at page 3, line 18
4.1. Atom . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1. Atom . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.1. Sequence set and UID set . . . . . . . . . . . . . . 16 4.1.1. Sequence set and UID set . . . . . . . . . . . . . . 16
4.2. Number . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2. Number . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3. String . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.3. String . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3.1. 8-bit and Binary Strings . . . . . . . . . . . . . . 17 4.3.1. 8-bit and Binary Strings . . . . . . . . . . . . . . 17
4.4. Parenthesized List . . . . . . . . . . . . . . . . . . . 18 4.4. Parenthesized List . . . . . . . . . . . . . . . . . . . 18
4.5. NIL . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.5. NIL . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5. Operational Considerations . . . . . . . . . . . . . . . . . 18 5. Operational Considerations . . . . . . . . . . . . . . . . . 18
5.1. Mailbox Naming . . . . . . . . . . . . . . . . . . . . . 18 5.1. Mailbox Naming . . . . . . . . . . . . . . . . . . . . . 18
5.1.1. Mailbox Hierarchy Naming . . . . . . . . . . . . . . 19 5.1.1. Mailbox Hierarchy Naming . . . . . . . . . . . . . . 19
5.1.2. Namespaces . . . . . . . . . . . . . . . . . . . . . 19 5.1.2. Namespaces . . . . . . . . . . . . . . . . . . . . . 20
5.2. Mailbox Size and Message Status Updates . . . . . . . . . 21 5.2. Mailbox Size and Message Status Updates . . . . . . . . . 21
5.3. Response when no Command in Progress . . . . . . . . . . 21 5.3. Response when no Command in Progress . . . . . . . . . . 21
5.4. Autologout Timer . . . . . . . . . . . . . . . . . . . . 21 5.4. Autologout Timer . . . . . . . . . . . . . . . . . . . . 22
5.5. Multiple Commands in Progress (Command Pipelining) . . . 22 5.5. Multiple Commands in Progress (Command Pipelining) . . . 22
6. Client Commands . . . . . . . . . . . . . . . . . . . . . . . 23 6. Client Commands . . . . . . . . . . . . . . . . . . . . . . . 23
6.1. Client Commands - Any State . . . . . . . . . . . . . . . 23 6.1. Client Commands - Any State . . . . . . . . . . . . . . . 24
6.1.1. CAPABILITY Command . . . . . . . . . . . . . . . . . 24 6.1.1. CAPABILITY Command . . . . . . . . . . . . . . . . . 24
6.1.2. NOOP Command . . . . . . . . . . . . . . . . . . . . 25 6.1.2. NOOP Command . . . . . . . . . . . . . . . . . . . . 25
6.1.3. LOGOUT Command . . . . . . . . . . . . . . . . . . . 25 6.1.3. LOGOUT Command . . . . . . . . . . . . . . . . . . . 25
6.2. Client Commands - Not Authenticated State . . . . . . . . 26 6.2. Client Commands - Not Authenticated State . . . . . . . . 26
6.2.1. STARTTLS Command . . . . . . . . . . . . . . . . . . 26 6.2.1. STARTTLS Command . . . . . . . . . . . . . . . . . . 26
6.2.2. AUTHENTICATE Command . . . . . . . . . . . . . . . . 27 6.2.2. AUTHENTICATE Command . . . . . . . . . . . . . . . . 27
6.2.3. LOGIN Command . . . . . . . . . . . . . . . . . . . . 30 6.2.3. LOGIN Command . . . . . . . . . . . . . . . . . . . . 30
6.3. Client Commands - Authenticated State . . . . . . . . . . 31 6.3. Client Commands - Authenticated State . . . . . . . . . . 31
6.3.1. ENABLE Command . . . . . . . . . . . . . . . . . . . 31 6.3.1. ENABLE Command . . . . . . . . . . . . . . . . . . . 31
6.3.2. SELECT Command . . . . . . . . . . . . . . . . . . . 33 6.3.2. SELECT Command . . . . . . . . . . . . . . . . . . . 33
skipping to change at page 4, line 6 skipping to change at page 4, line 6
6.3.12. STATUS Command . . . . . . . . . . . . . . . . . . . 49 6.3.12. STATUS Command . . . . . . . . . . . . . . . . . . . 49
6.3.13. APPEND Command . . . . . . . . . . . . . . . . . . . 51 6.3.13. APPEND Command . . . . . . . . . . . . . . . . . . . 51
6.3.14. IDLE Command . . . . . . . . . . . . . . . . . . . . 53 6.3.14. IDLE Command . . . . . . . . . . . . . . . . . . . . 53
6.4. Client Commands - Selected State . . . . . . . . . . . . 55 6.4. Client Commands - Selected State . . . . . . . . . . . . 55
6.4.1. CHECK Command . . . . . . . . . . . . . . . . . . . . 56 6.4.1. CHECK Command . . . . . . . . . . . . . . . . . . . . 56
6.4.2. CLOSE Command . . . . . . . . . . . . . . . . . . . . 56 6.4.2. CLOSE Command . . . . . . . . . . . . . . . . . . . . 56
6.4.3. UNSELECT Command . . . . . . . . . . . . . . . . . . 57 6.4.3. UNSELECT Command . . . . . . . . . . . . . . . . . . 57
6.4.4. EXPUNGE Command . . . . . . . . . . . . . . . . . . . 57 6.4.4. EXPUNGE Command . . . . . . . . . . . . . . . . . . . 57
6.4.5. SEARCH Command . . . . . . . . . . . . . . . . . . . 58 6.4.5. SEARCH Command . . . . . . . . . . . . . . . . . . . 58
6.4.6. FETCH Command . . . . . . . . . . . . . . . . . . . . 63 6.4.6. FETCH Command . . . . . . . . . . . . . . . . . . . . 63
6.4.7. STORE Command . . . . . . . . . . . . . . . . . . . . 66 6.4.7. STORE Command . . . . . . . . . . . . . . . . . . . . 67
6.4.8. COPY Command . . . . . . . . . . . . . . . . . . . . 68 6.4.8. COPY Command . . . . . . . . . . . . . . . . . . . . 68
6.4.9. MOVE Command . . . . . . . . . . . . . . . . . . . . 69 6.4.9. MOVE Command . . . . . . . . . . . . . . . . . . . . 69
6.4.10. UID Command . . . . . . . . . . . . . . . . . . . . . 70 6.4.10. UID Command . . . . . . . . . . . . . . . . . . . . . 71
6.5. Client Commands - Experimental/Expansion . . . . . . . . 72 6.5. Client Commands - Experimental/Expansion . . . . . . . . 73
6.5.1. X<atom> Command . . . . . . . . . . . . . . . . . . . 72 6.5.1. X<atom> Command . . . . . . . . . . . . . . . . . . . 73
7. Server Responses . . . . . . . . . . . . . . . . . . . . . . 73 7. Server Responses . . . . . . . . . . . . . . . . . . . . . . 74
7.1. Server Responses - Status Responses . . . . . . . . . . . 74 7.1. Server Responses - Status Responses . . . . . . . . . . . 75
7.1.1. OK Response . . . . . . . . . . . . . . . . . . . . . 81 7.1.1. OK Response . . . . . . . . . . . . . . . . . . . . . 82
7.1.2. NO Response . . . . . . . . . . . . . . . . . . . . . 81 7.1.2. NO Response . . . . . . . . . . . . . . . . . . . . . 82
7.1.3. BAD Response . . . . . . . . . . . . . . . . . . . . 82 7.1.3. BAD Response . . . . . . . . . . . . . . . . . . . . 83
7.1.4. PREAUTH Response . . . . . . . . . . . . . . . . . . 82 7.1.4. PREAUTH Response . . . . . . . . . . . . . . . . . . 83
7.1.5. BYE Response . . . . . . . . . . . . . . . . . . . . 83 7.1.5. BYE Response . . . . . . . . . . . . . . . . . . . . 83
7.2. Server Responses - Server and Mailbox Status . . . . . . 83 7.2. Server Responses - Server and Mailbox Status . . . . . . 84
7.2.1. The ENABLED Response . . . . . . . . . . . . . . . . 83 7.2.1. The ENABLED Response . . . . . . . . . . . . . . . . 84
7.2.2. CAPABILITY Response . . . . . . . . . . . . . . . . . 84 7.2.2. CAPABILITY Response . . . . . . . . . . . . . . . . . 84
7.2.3. LIST Response . . . . . . . . . . . . . . . . . . . . 85 7.2.3. LIST Response . . . . . . . . . . . . . . . . . . . . 85
7.2.4. LSUB Response . . . . . . . . . . . . . . . . . . . . 87 7.2.4. LSUB Response . . . . . . . . . . . . . . . . . . . . 88
7.2.5. NAMESPACE Response . . . . . . . . . . . . . . . . . 88 7.2.5. NAMESPACE Response . . . . . . . . . . . . . . . . . 89
7.2.6. STATUS Response . . . . . . . . . . . . . . . . . . . 88 7.2.6. STATUS Response . . . . . . . . . . . . . . . . . . . 89
7.2.7. ESEARCH Response . . . . . . . . . . . . . . . . . . 88 7.2.7. ESEARCH Response . . . . . . . . . . . . . . . . . . 89
7.2.8. FLAGS Response . . . . . . . . . . . . . . . . . . . 89 7.2.8. FLAGS Response . . . . . . . . . . . . . . . . . . . 90
7.3. Server Responses - Mailbox Size . . . . . . . . . . . . . 89 7.3. Server Responses - Mailbox Size . . . . . . . . . . . . . 90
7.3.1. EXISTS Response . . . . . . . . . . . . . . . . . . . 89 7.3.1. EXISTS Response . . . . . . . . . . . . . . . . . . . 90
7.4. Server Responses - Message Status . . . . . . . . . . . . 90 7.4. Server Responses - Message Status . . . . . . . . . . . . 90
7.4.1. EXPUNGE Response . . . . . . . . . . . . . . . . . . 90 7.4.1. EXPUNGE Response . . . . . . . . . . . . . . . . . . 91
7.4.2. FETCH Response . . . . . . . . . . . . . . . . . . . 91 7.4.2. FETCH Response . . . . . . . . . . . . . . . . . . . 91
7.5. Server Responses - Command Continuation Request . . . . . 96 7.5. Server Responses - Command Continuation Request . . . . . 97
8. Sample IMAP4rev2 connection . . . . . . . . . . . . . . . . . 96 8. Sample IMAP4rev2 connection . . . . . . . . . . . . . . . . . 98
9. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 97 9. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 99
10. Author's Note . . . . . . . . . . . . . . . . . . . . . . . . 112 10. Author's Note . . . . . . . . . . . . . . . . . . . . . . . . 114
11. Security Considerations . . . . . . . . . . . . . . . . . . . 112 11. Security Considerations . . . . . . . . . . . . . . . . . . . 114
11.1. STARTTLS Security Considerations . . . . . . . . . . . . 112 11.1. STARTTLS Security Considerations . . . . . . . . . . . . 114
11.2. COPYUID and APPENDUID response codes . . . . . . . . . . 112 11.2. COPYUID and APPENDUID response codes . . . . . . . . . . 115
11.3. Other Security Considerations . . . . . . . . . . . . . 113 11.3. Other Security Considerations . . . . . . . . . . . . . 115
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 113 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 116
12.1. Updates to IMAP4 Capabilities registry . . . . . . . . . 114 12.1. Updates to IMAP4 Capabilities registry . . . . . . . . . 116
12.2. GSSAPI/SASL service name . . . . . . . . . . . . . . . . 114 12.2. GSSAPI/SASL service name . . . . . . . . . . . . . . . . 116
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 114 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 116
13.1. Normative References . . . . . . . . . . . . . . . . . . 114 13.1. Normative References . . . . . . . . . . . . . . . . . . 116
13.2. Informative References (related protocols) . . . . . . . 117 13.2. Informative References (related protocols) . . . . . . . 119
13.3. Informative References (historical aspects of IMAP and 13.3. Informative References (historical aspects of IMAP and
related protocols) . . . . . . . . . . . . . . . . . . . 118 related protocols) . . . . . . . . . . . . . . . . . . . 120
Appendix A. Backward compatibility with IMAP4rev1 . . . . . . . 119 Appendix A. Backward compatibility with IMAP4rev1 . . . . . . . 121
A.1. Mailbox International Naming Convention . . . . . . . . . 119 A.1. Mailbox International Naming Convention . . . . . . . . . 121
Appendix B. Changes from RFC 3501 / IMAP4rev1 . . . . . . . . . 121 Appendix B. Backward compatibility with BINARY extension . . . . 123
Appendix C. Acknowledgement . . . . . . . . . . . . . . . . . . 122 Appendix C. Changes from RFC 3501 / IMAP4rev1 . . . . . . . . . 123
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Appendix D. Acknowledgement . . . . . . . . . . . . . . . . . . 125
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 128 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 130
1. How to Read This Document 1. How to Read This Document
1.1. Organization of This Document 1.1. Organization of This Document
This document is written from the point of view of the implementor of This document is written from the point of view of the implementor of
an IMAP4rev2 client or server. Beyond the protocol overview in an IMAP4rev2 client or server. Beyond the protocol overview in
section 2, it is not optimized for someone trying to understand the section 2, it is not optimized for someone trying to understand the
operation of the protocol. The material in sections 3 through 5 operation of the protocol. The material in sections 3 through 5
provides the general context and definitions with which IMAP4rev2 provides the general context and definitions with which IMAP4rev2
skipping to change at page 18, line 5 skipping to change at page 18, line 5
transmit 8-bit or multi-octet characters in literals, but SHOULD do transmit 8-bit or multi-octet characters in literals, but SHOULD do
so only when the [CHARSET] is identified. so only when the [CHARSET] is identified.
IMAP4rev2 is compatible with [I18N-HDRS]. As a result, the IMAP4rev2 is compatible with [I18N-HDRS]. As a result, the
identified charset for header-field values with 8-bit content is identified charset for header-field values with 8-bit content is
UTF-8 [UTF-8]. IMAP4rev2 implementations MUST accept and MAY UTF-8 [UTF-8]. IMAP4rev2 implementations MUST accept and MAY
transmit [UTF-8] text in quoted-strings as long as the string does transmit [UTF-8] text in quoted-strings as long as the string does
not contain NUL, CR, or LF. This differs from IMAP4rev1 not contain NUL, CR, or LF. This differs from IMAP4rev1
implementations. implementations.
Although a BINARY body encoding is defined, unencoded binary strings Although a BINARY content transfer encoding is defined, unencoded
are not permitted. A "binary string" is any string with NUL binary strings are not permitted, unless returned in a <literal8> in
characters. Implementations MUST encode binary data into a textual response to BINARY.PEEK[<section-binary>]<<partial>> or
form, such as BASE64, before transmitting the data. A string with an BINARY[<section-binary>]<<partial>> FETCH data item. A "binary
string" is any string with NUL characters. A string with an
excessive amount of CTL characters MAY also be considered to be excessive amount of CTL characters MAY also be considered to be
binary. binary. Unless returned in response to BINARY.PEEK[...]/BINARY[...]
FETCH, client and server implementations MUST encode binary data into
a textual form, such as BASE64, before transmitting the data.
4.4. Parenthesized List 4.4. Parenthesized List
Data structures are represented as a "parenthesized list"; a sequence Data structures are represented as a "parenthesized list"; a sequence
of data items, delimited by space, and bounded at each end by of data items, delimited by space, and bounded at each end by
parentheses. A parenthesized list can contain other parenthesized parentheses. A parenthesized list can contain other parenthesized
lists, using multiple levels of parentheses to indicate nesting. lists, using multiple levels of parentheses to indicate nesting.
The empty list is represented as () -- a parenthesized list with no The empty list is represented as () -- a parenthesized list with no
members. members.
skipping to change at page 25, line 28 skipping to change at page 25, line 39
message status updates during a period of inactivity (this is the message status updates during a period of inactivity (this is the
preferred method to do this). The NOOP command can also be used to preferred method to do this). The NOOP command can also be used to
reset any inactivity autologout timer on the server. reset any inactivity autologout timer on the server.
Example: C: a002 NOOP Example: C: a002 NOOP
S: a002 OK NOOP completed S: a002 OK NOOP completed
. . . . . .
C: a047 NOOP C: a047 NOOP
S: * 22 EXPUNGE S: * 22 EXPUNGE
S: * 23 EXISTS S: * 23 EXISTS
S: * 14 FETCH (FLAGS (\Seen \Deleted)) S: * 14 FETCH (UID 1305 FLAGS (\Seen \Deleted))
S: a047 OK NOOP completed S: a047 OK NOOP completed
6.1.3. LOGOUT Command 6.1.3. LOGOUT Command
Arguments: none Arguments: none
Responses: REQUIRED untagged response: BYE Responses: REQUIRED untagged response: BYE
Result: OK - logout completed Result: OK - logout completed
BAD - command unknown or arguments invalid BAD - command unknown or arguments invalid
skipping to change at page 64, line 9 skipping to change at page 64, line 9
by itself, and not in conjunction with other macros or data items. by itself, and not in conjunction with other macros or data items.
ALL Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) ALL Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)
FAST Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE) FAST Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE)
FULL Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE FULL Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE
BODY) BODY)
The currently defined data items that can be fetched are: The currently defined data items that can be fetched are:
BINARY[<section-binary>]<<partial>>
Requests that the specified section be transmitted after
performing Content-Transfer-Encoding-related decoding.
The <partial> argument, if present, requests that a subset of
the data be returned. The semantics of a partial FETCH BINARY
command are the same as for a partial FETCH BODY command, with
the exception that the <partial> arguments refer to the DECODED
section data.
BINARY.PEEK[<section-binary>]<<partial>> An alternate form of
BINARY[<section-binary>] that does not implicitly set the \Seen
flag.
BINARY.SIZE[<section-binary>]
Requests the decoded size of the section (i.e., the size to
expect in response to the corresponding FETCH BINARY request).
Note: client authors are cautioned that this might be an
expensive operation for some server implementations.
Needlessly issuing this request could result in degraded
performance due to servers having to calculate the value every
time the request is issued.
BODY Non-extensible form of BODYSTRUCTURE. BODY Non-extensible form of BODYSTRUCTURE.
BODY[<section>]<<partial>> BODY[<section>]<<partial>>
The text of a particular body section. The section The text of a particular body section. The section
specification is a set of zero or more part specifiers specification is a set of zero or more part specifiers
delimited by periods. A part specifier is either a part number delimited by periods. A part specifier is either a part number
or one of the following: HEADER, HEADER.FIELDS, or one of the following: HEADER, HEADER.FIELDS,
HEADER.FIELDS.NOT, MIME, and TEXT. An empty section HEADER.FIELDS.NOT, MIME, and TEXT. An empty section
specification refers to the entire message, including the specification refers to the entire message, including the
skipping to change at page 81, line 19 skipping to change at page 82, line 10
UNAVAILABLE UNAVAILABLE
Temporary failure because a subsystem is down. For example, an Temporary failure because a subsystem is down. For example, an
IMAP server that uses a Lightweight Directory Access Protocol IMAP server that uses a Lightweight Directory Access Protocol
(LDAP) or Radius server for authentication might use this (LDAP) or Radius server for authentication might use this
response code when the LDAP/Radius server is down. response code when the LDAP/Radius server is down.
C: a LOGIN "fred" "foo" C: a LOGIN "fred" "foo"
S: a NO [UNAVAILABLE] User's backend down for maintenance S: a NO [UNAVAILABLE] User's backend down for maintenance
UNKNOWN-CTE
The server does not know how to decode the section's Content-
Transfer-Encoding.
Additional response codes defined by particular client or server Additional response codes defined by particular client or server
implementations SHOULD be prefixed with an "X" until they are added implementations SHOULD be prefixed with an "X" until they are added
to a revision of this protocol. Client implementations SHOULD ignore to a revision of this protocol. Client implementations SHOULD ignore
response codes that they do not recognize. response codes that they do not recognize.
7.1.1. OK Response 7.1.1. OK Response
Contents: OPTIONAL response code Contents: OPTIONAL response code
human-readable text human-readable text
skipping to change at page 91, line 11 skipping to change at page 92, line 4
The update from the EXPUNGE response MUST be recorded by the client. The update from the EXPUNGE response MUST be recorded by the client.
Example: S: * 44 EXPUNGE Example: S: * 44 EXPUNGE
7.4.2. FETCH Response 7.4.2. FETCH Response
Contents: message data Contents: message data
The FETCH response returns data about a message to the client. The The FETCH response returns data about a message to the client. The
data are pairs of data item names and their values in parentheses. data are pairs of data item names and their values in parentheses.
This response occurs as the result of a FETCH or STORE command, as This response occurs as the result of a FETCH or STORE command, as
well as by unilateral server decision (e.g., flag updates). well as by unilateral server decision (e.g., flag updates).
The current data items are: The current data items are:
BINARY[<section-binary>]<<number>>
An <nstring> or <literal8> expressing the content of the
specified section after removing any Content-Transfer-Encoding-
related encoding. If <number> is present it refers to the
offset within the DECODED section data.
If the domain of the decoded data is "8bit" and the data does
not contain the NUL octet, the server SHOULD return the data in
a <string> instead of a <literal8>; this allows the client to
determine if the "8bit" data contains the NUL octet without
having to explicitly scan the data stream for for NULs.
Messaging clients and servers have been notoriously lax in
their adherence to the Internet CRLF convention for terminating
lines of textual data (text/* media types) in Internet
protocols. When sending data in BINARY[...] FETCH data item,
servers MUST ensure that textual line-oriented sections are
always transmitted using the IMAP4 CRLF line termination
syntax, regardless of the underlying storage representation of
the data on the server.
If the server does not know how to decode the section's
Content-Transfer-Encoding, it MUST fail the request and issue a
"NO" response that contains the "UNKNOWN-CTE" response code.
BINARY.SIZE[<section-binary>]
The size of the section after removing any Content-Transfer-
Encoding-related encoding. The value returned MUST match the
size of the <nstring> or <literal8> that will be returned by
the corresponding FETCH BINARY request.
If the server does not know how to decode the section's
Content-Transfer-Encoding, it MUST fail the request and issue a
"NO" response that contains the "UNKNOWN-CTE" response code.
BODY A form of BODYSTRUCTURE without extension data. BODY A form of BODYSTRUCTURE without extension data.
BODY[<section>]<<origin octet>> BODY[<section>]<<origin octet>>
A string expressing the body contents of the specified section. A string expressing the body contents of the specified section.
The string SHOULD be interpreted by the client according to the The string SHOULD be interpreted by the client according to the
content transfer encoding, body type, and subtype. content transfer encoding, body type, and subtype.
If the origin octet is specified, this string is a substring of If the origin octet is specified, this string is a substring of
the entire body contents, starting at that origin octet. This the entire body contents, starting at that origin octet. This
means that BODY[]<0> MAY be truncated, but BODY[] is NEVER means that BODY[]<0> MAY be truncated, but BODY[] is NEVER
truncated. truncated.
Note: The origin octet facility MUST NOT be used by a server Note: The origin octet facility MUST NOT be used by a server
skipping to change at page 92, line 33 skipping to change at page 94, line 19
Extension data follows the multipart subtype. Extension data Extension data follows the multipart subtype. Extension data
is never returned with the BODY fetch, but can be returned with is never returned with the BODY fetch, but can be returned with
a BODYSTRUCTURE fetch. Extension data, if present, MUST be in a BODYSTRUCTURE fetch. Extension data, if present, MUST be in
the defined order. The extension data of a multipart body part the defined order. The extension data of a multipart body part
are in the following order: are in the following order:
body parameter parenthesized list A parenthesized list of body parameter parenthesized list A parenthesized list of
attribute/value pairs [e.g., ("foo" "bar" "baz" "rag") where attribute/value pairs [e.g., ("foo" "bar" "baz" "rag") where
"bar" is the value of "foo", and "rag" is the value of "bar" is the value of "foo", and "rag" is the value of
"baz"] as defined in [MIME-IMB]. "baz"] as defined in [MIME-IMB]. Servers SHOULD decode
parameter value continuations as described in [RFC2231].
body disposition A parenthesized list, consisting of a body disposition A parenthesized list, consisting of a
disposition type string, followed by a parenthesized list of disposition type string, followed by a parenthesized list of
disposition attribute/value pairs as defined in disposition attribute/value pairs as defined in
[DISPOSITION]. [DISPOSITION]. Servers SHOULD decode parameter value
continuations as described in [RFC2231].
body language A string or parenthesized list giving the body body language A string or parenthesized list giving the body
language value as defined in [LANGUAGE-TAGS]. language value as defined in [LANGUAGE-TAGS].
body location A string giving the body content URI as defined body location A string giving the body content URI as defined
in [LOCATION]. in [LOCATION].
Any following extension data are not yet defined in this Any following extension data are not yet defined in this
version of the protocol. Such extension data can consist of version of the protocol. Such extension data can consist of
zero or more NILs, strings, numbers, or potentially nested zero or more NILs, strings, numbers, or potentially nested
skipping to change at page 93, line 21 skipping to change at page 95, line 10
defined in [MIME-IMB]. defined in [MIME-IMB].
body subtype A string giving the content subtype name as body subtype A string giving the content subtype name as
defined in [MIME-IMB]. defined in [MIME-IMB].
body parameter parenthesized list A parenthesized list of body parameter parenthesized list A parenthesized list of
attribute/value pairs [e.g., ("foo" "bar" "baz" "rag") where attribute/value pairs [e.g., ("foo" "bar" "baz" "rag") where
"bar" is the value of "foo" and "rag" is the value of "baz"] "bar" is the value of "foo" and "rag" is the value of "baz"]
as defined in [MIME-IMB]. as defined in [MIME-IMB].
body id A string giving the content id as defined in body id A string giving the Content-ID header field value as
[MIME-IMB]. defined in Section 7 of [MIME-IMB].
body description A string giving the content description as body description A string giving the Content-Description
defined in [MIME-IMB]. header field value as defined in Section 8 of [MIME-IMB].
body encoding A string giving the content transfer encoding as body encoding A string giving the content transfer encoding as
defined in [MIME-IMB]. defined in Section 6 of [MIME-IMB].
body size A number giving the size of the body in octets. body size A number giving the size of the body in octets.
Note that this size is the size in its transfer encoding and Note that this size is the size in its transfer encoding and
not the resulting size after any decoding. not the resulting size after any decoding.
A body type of type MESSAGE and subtype RFC822 contains, A body type of type MESSAGE and subtype RFC822 contains,
immediately after the basic fields, the envelope structure, immediately after the basic fields, the envelope structure,
body structure, and size in text lines of the encapsulated body structure, and size in text lines of the encapsulated
message. message.
skipping to change at page 102, line 51 skipping to change at page 104, line 51
examine = "EXAMINE" SP mailbox examine = "EXAMINE" SP mailbox
fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" / fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" /
fetch-att / "(" fetch-att *(SP fetch-att) ")") fetch-att / "(" fetch-att *(SP fetch-att) ")")
fetch-att = "ENVELOPE" / "FLAGS" / "INTERNALDATE" / fetch-att = "ENVELOPE" / "FLAGS" / "INTERNALDATE" /
"RFC822" [".HEADER" / ".SIZE" / ".TEXT"] / "RFC822" [".HEADER" / ".SIZE" / ".TEXT"] /
"BODY" ["STRUCTURE"] / "UID" / "BODY" ["STRUCTURE"] / "UID" /
"BODY" section [partial] / "BODY" section [partial] /
"BODY.PEEK" section [partial] "BODY.PEEK" section [partial] /
"BINARY" [".PEEK"] section-binary [partial] /
"BINARY.SIZE" section-binary
flag = "\Answered" / "\Flagged" / "\Deleted" / flag = "\Answered" / "\Flagged" / "\Deleted" /
"\Seen" / "\Draft" / flag-keyword / flag-extension "\Seen" / "\Draft" / flag-keyword / flag-extension
; Does not include "\Recent" ; Does not include "\Recent"
flag-extension = "\" atom flag-extension = "\" atom
; Future expansion. Client implementations ; Future expansion. Client implementations
; MUST accept flag-extension flags. Server ; MUST accept flag-extension flags. Server
; implementations MUST NOT generate ; implementations MUST NOT generate
; flag-extension flags except as defined by ; flag-extension flags except as defined by
skipping to change at page 103, line 48 skipping to change at page 105, line 50
list = "LIST" SP mailbox SP list-mailbox list = "LIST" SP mailbox SP list-mailbox
list-mailbox = 1*list-char / string list-mailbox = 1*list-char / string
list-char = ATOM-CHAR / list-wildcards / resp-specials list-char = ATOM-CHAR / list-wildcards / resp-specials
list-wildcards = "%" / "*" list-wildcards = "%" / "*"
literal = "{" number ["+"] "}" CRLF *CHAR8 literal = "{" number ["+"] "}" CRLF *CHAR8
; Number represents the number of CHAR8s. ; <number> represents the number of CHAR8s.
; A non-synchronizing literal is distinguished from ; A non-synchronizing literal is distinguished from
; a synchronizing literal by presence of the "+" ; a synchronizing literal by presence of the "+"
; before the closing "}". ; before the closing "}".
; Non synchronizing literals are not allowed when ; Non synchronizing literals are not allowed when
; sent from server to the client. ; sent from server to the client.
literal8 = "~{" number "}" CRLF *OCTET
; <number> represents the number of OCTETs
; in the response string.
login = "LOGIN" SP userid SP password login = "LOGIN" SP userid SP password
lsub = "LSUB" SP mailbox SP list-mailbox lsub = "LSUB" SP mailbox SP list-mailbox
mailbox = "INBOX" / astring mailbox = "INBOX" / astring
; INBOX is case-insensitive. All case variants of ; INBOX is case-insensitive. All case variants of
; INBOX (e.g., "iNbOx") MUST be interpreted as INBOX ; INBOX (e.g., "iNbOx") MUST be interpreted as INBOX
; not as an astring. An astring which consists of ; not as an astring. An astring which consists of
; the case-insensitive sequence "I" "N" "B" "O" "X" ; the case-insensitive sequence "I" "N" "B" "O" "X"
; is considered to be INBOX and not an astring. ; is considered to be INBOX and not an astring.
skipping to change at page 105, line 20 skipping to change at page 107, line 27
*(SP (msg-att-dynamic / msg-att-static)) ")" *(SP (msg-att-dynamic / msg-att-static)) ")"
msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")" msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")"
; MAY change for a message ; MAY change for a message
msg-att-static = "ENVELOPE" SP envelope / "INTERNALDATE" SP date-time / msg-att-static = "ENVELOPE" SP envelope / "INTERNALDATE" SP date-time /
"RFC822" [".HEADER" / ".TEXT"] SP nstring / "RFC822" [".HEADER" / ".TEXT"] SP nstring /
"RFC822.SIZE" SP number / "RFC822.SIZE" SP number /
"BODY" ["STRUCTURE"] SP body / "BODY" ["STRUCTURE"] SP body /
"BODY" section ["<" number ">"] SP nstring / "BODY" section ["<" number ">"] SP nstring /
"BINARY" section-binary SP (nstring / literal8) /
"BINARY.SIZE" section-binary SP number /
"UID" SP uniqueid "UID" SP uniqueid
; MUST NOT change for a message ; MUST NOT change for a message
Namespace = nil / "(" 1*Namespace-Descr ")" Namespace = nil / "(" 1*Namespace-Descr ")"
Namespace-Command = "NAMESPACE" Namespace-Command = "NAMESPACE"
Namespace-Descr = "(" string SP Namespace-Descr = "(" string SP
(DQUOTE QUOTED-CHAR DQUOTE / nil) (DQUOTE QUOTED-CHAR DQUOTE / nil)
*(Namespace-Response-Extension) ")" *(Namespace-Response-Extension) ")"
skipping to change at page 107, line 26 skipping to change at page 109, line 33
"UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number /
resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" / resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" /
"UNAVAILABLE" / "AUTHENTICATIONFAILED" / "UNAVAILABLE" / "AUTHENTICATIONFAILED" /
"AUTHORIZATIONFAILED" / "EXPIRED" / "AUTHORIZATIONFAILED" / "EXPIRED" /
"PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" / "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" /
"INUSE" / "EXPUNGEISSUED" / "CORRUPTION" / "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" /
"SERVERBUG" / "CLIENTBUG" / "CANNOT" / "SERVERBUG" / "CLIENTBUG" / "CANNOT" /
"LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" / "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" /
"NONEXISTENT" / "NONEXISTENT" /
"CLOSED" / "CLOSED" /
"UNKNOWN-CTE" /
atom [SP 1*<any TEXT-CHAR except "]">] atom [SP 1*<any TEXT-CHAR except "]">]
search = "SEARCH" [search-return-opts] search = "SEARCH" [search-return-opts]
SP search-program SP search-program
search-correlator = SP "(" "TAG" SP tag-string ")" search-correlator = SP "(" "TAG" SP tag-string ")"
search-key = "ALL" / "ANSWERED" / "BCC" SP astring / search-key = "ALL" / "ANSWERED" / "BCC" SP astring /
"BEFORE" SP date / "BODY" SP astring / "BEFORE" SP date / "BODY" SP astring /
"CC" SP astring / "DELETED" / "FLAGGED" / "CC" SP astring / "DELETED" / "FLAGGED" /
skipping to change at page 108, line 45 skipping to change at page 111, line 7
search-return-value = tagged-ext-val search-return-value = tagged-ext-val
; Data for the returned search option. ; Data for the returned search option.
; A single "nz-number"/"number"/"number64" value ; A single "nz-number"/"number"/"number64" value
; can be returned as an atom (i.e., without ; can be returned as an atom (i.e., without
; quoting). A sequence-set can be returned ; quoting). A sequence-set can be returned
; as an atom as well. ; as an atom as well.
section = "[" [section-spec] "]" section = "[" [section-spec] "]"
section-binary = "[" [section-part] "]"
section-msgtext = "HEADER" / "HEADER.FIELDS" [".NOT"] SP header-list / section-msgtext = "HEADER" / "HEADER.FIELDS" [".NOT"] SP header-list /
"TEXT" "TEXT"
; top-level or MESSAGE/RFC822 or MESSAGE/GLOBAL part ; top-level or MESSAGE/RFC822 or MESSAGE/GLOBAL part
section-part = nz-number *("." nz-number) section-part = nz-number *("." nz-number)
; body part reference. ; body part reference.
; Allows for accessing nested body parts. ; Allows for accessing nested body parts.
section-spec = section-msgtext / (section-part ["." section-text]) section-spec = section-msgtext / (section-part ["." section-text])
skipping to change at page 116, line 10 skipping to change at page 118, line 16
Freed, N. and N. Borenstein, "Multipurpose Internet Mail Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC 2045, November 1996, Bodies", RFC 2045, November 1996,
<http://www.rfc-editor.org/info/rfc2045>. <http://www.rfc-editor.org/info/rfc2045>.
[MIME-IMT] [MIME-IMT]
Freed, N. and N. Borenstein, "Multipurpose Internet Mail Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996, <http://www.rfc-editor.org/info/rfc2046>. November 1996, <http://www.rfc-editor.org/info/rfc2046>.
[RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and Encoded
Word Extensions: Character Sets, Languages, and
Continuations", RFC 2231, DOI 10.17487/RFC2231, November
1997, <https://www.rfc-editor.org/info/rfc2231>.
[RFC-5322] [RFC-5322]
Resnick, P., Ed., "Internet Message Format", RFC 5322, Resnick, P., Ed., "Internet Message Format", RFC 5322,
October 2008, <http://www.rfc-editor.org/info/rfc5322>. October 2008, <http://www.rfc-editor.org/info/rfc5322>.
[SASL] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple [SASL] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple
Authentication and Security Layer (SASL)", RFC 4422, June Authentication and Security Layer (SASL)", RFC 4422, June
2006, <http://www.rfc-editor.org/info/rfc4422>. 2006, <http://www.rfc-editor.org/info/rfc4422>.
[TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security [TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008, (TLS) Protocol Version 1.2", RFC 5246, August 2008,
skipping to change at page 118, line 12 skipping to change at page 120, line 22
Support for UTF-8", RFC 6855, DOI 10.17487/RFC6855, March Support for UTF-8", RFC 6855, DOI 10.17487/RFC6855, March
2013, <http://www.rfc-editor.org/info/rfc6855>. 2013, <http://www.rfc-editor.org/info/rfc6855>.
[ACAP] Newman, C. and J. G. Myers, "ACAP -- Application [ACAP] Newman, C. and J. G. Myers, "ACAP -- Application
Configuration Access Protocol", RFC 2244, November 1997, Configuration Access Protocol", RFC 2244, November 1997,
<http://www.rfc-editor.org/info/rfc2244>. <http://www.rfc-editor.org/info/rfc2244>.
[SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
October 2008, <http://www.rfc-editor.org/info/rfc5321>. October 2008, <http://www.rfc-editor.org/info/rfc5321>.
[RFC3516] Nerenberg, L., "IMAP4 Binary Content Extension", RFC 3516,
DOI 10.17487/RFC3516, April 2003,
<https://www.rfc-editor.org/info/rfc3516>.
[RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
RFC 4314, December 2005, RFC 4314, December 2005,
<http://www.rfc-editor.org/info/rfc4314>. <http://www.rfc-editor.org/info/rfc4314>.
[RFC2087] Myers, J., "IMAP4 QUOTA extension", RFC 2087, January [RFC2087] Myers, J., "IMAP4 QUOTA extension", RFC 2087, January
1997, <http://www.rfc-editor.org/info/rfc2087>. 1997, <http://www.rfc-editor.org/info/rfc2087>.
[IMAP-URL] [IMAP-URL]
Melnikov, A., Ed. and C. Newman, "IMAP URL Scheme", Melnikov, A., Ed. and C. Newman, "IMAP URL Scheme",
RFC 5092, DOI 10.17487/RFC5092, November 2007, RFC 5092, DOI 10.17487/RFC5092, November 2007,
skipping to change at page 121, line 4 skipping to change at page 123, line 18
mailbox name with an embedded "&" character unless it complies with mailbox name with an embedded "&" character unless it complies with
the modified UTF-7 syntax. the modified UTF-7 syntax.
Server implementations which export a mail store that does not follow Server implementations which export a mail store that does not follow
the modified UTF-7 convention MUST convert to modified UTF-7 any the modified UTF-7 convention MUST convert to modified UTF-7 any
mailbox name that contains either non-ASCII characters or the "&" mailbox name that contains either non-ASCII characters or the "&"
character. character.
For example, here is a mailbox name which mixes English, Chinese, For example, here is a mailbox name which mixes English, Chinese,
and Japanese text: ~peter/mail/&U,BTFw-/&ZeVnLIqe- and Japanese text: ~peter/mail/&U,BTFw-/&ZeVnLIqe-
For example, the string "&Jjo!" is not a valid mailbox name For example, the string "&Jjo!" is not a valid mailbox name
because it does not contain a shift to US-ASCII before the "!". because it does not contain a shift to US-ASCII before the "!".
The correct form is "&Jjo-!". The string "&U,BTFw-&ZeVnLIqe-" is The correct form is "&Jjo-!". The string "&U,BTFw-&ZeVnLIqe-" is
not permitted because it contains a superfluous shift. The not permitted because it contains a superfluous shift. The
correct form is "&U,BTF2XlZyyKng-". correct form is "&U,BTF2XlZyyKng-".
Appendix B. Changes from RFC 3501 / IMAP4rev1 Appendix B. Backward compatibility with BINARY extension
IMAP4rev2 is incorporates subset of functionality provided by the
BINARY extension [RFC3516], in particular it includes additional
FETCH items (BINARY, BINARY.PEEK and BINARY.SIZE), but not extensions
to the APPEND command. IMAP4rev2 implementations that supports full
RFC 3516 functionality need to also advertise the BINARY token in the
CAPABILITY response.
Appendix C. Changes from RFC 3501 / IMAP4rev1
The following is the plan for remaining changes. The plan might The following is the plan for remaining changes. The plan might
change over time. change over time.
1. Fold in the following extensions/RFC: RFC 5530 (IMAP Response 1. Fold in the following extensions/RFC: RFC 5530 (IMAP Response
Codes, done), UIDPLUS (done), ENABLE (done), ESEARCH (done), Codes, done), UIDPLUS (done), ENABLE (done), ESEARCH (done),
SPECIAL-USE (list of new mailbox attributes is done), LITERAL- SPECIAL-USE (list of new mailbox attributes is done), LITERAL-
(done), NAMESPACE (done), SASL-IR (done), IDLE (done), MOVE (done), NAMESPACE (done), SASL-IR (done), IDLE (done), MOVE
(done). (done).
skipping to change at page 121, line 37 skipping to change at page 124, line 13
4. Require all unsolicited FETCH updates to include UID - done. 4. Require all unsolicited FETCH updates to include UID - done.
5. Update recommendations on TLS ciphers to match UTA WG work (as 5. Update recommendations on TLS ciphers to match UTA WG work (as
per RFC 8314, RFC 7525 and RFC 7817) - done. per RFC 8314, RFC 7525 and RFC 7817) - done.
6. Possibly fold in the following extensions/RFC: Base LIST- 6. Possibly fold in the following extensions/RFC: Base LIST-
EXTENDED syntax plus deprecate LSUB (replace it with LIST EXTENDED syntax plus deprecate LSUB (replace it with LIST
\Subscribed) minus the requirement to support multiple list \Subscribed) minus the requirement to support multiple list
patterns, STATUS-in-LIST, SEARCHRES, BINARY (only the FETCH patterns, STATUS-in-LIST, SEARCHRES, BINARY (only the FETCH
changes on leaf body part and make APPEND related ones optional. changes on leaf body part and make APPEND related ones optional.
See the mailing list discussion), Unique mailstore IDs for See the mailing list discussion) - done.
messages (OBJECTID extension, RFC 8474) -- rough consensus to
keep it as an extension.
7. Add STATUS SIZE (total mailbox size) - done Add STATUS DELETED 7. Add STATUS SIZE (total mailbox size) - done Add STATUS DELETED
(number of messages with \Deleted flag set)? Or DELETEDSIZE? (number of messages with \Deleted flag set)? Or DELETEDSIZE?
8. Deprecate features: What should we do with NEW search key (which 8. Deprecate features: What should we do with NEW search key (which
implies RECENT): deprecate it or just redefine it to ignore implies RECENT): deprecate it or just redefine it to ignore
RECENT state? RECENT state?
9. Drop UTF-7, all mailboxes are always in UTF-8 - done. 9. Drop UTF-7, all mailboxes are always in UTF-8 - done.
10. Revise IANA registration of IMAP extensions and give advice on 10. Revise IANA registration of IMAP extensions and give advice on
use of "X-" convention. use of "X-" convention.
11. Allow word-based searching (as per Chris Newman)? 11. Allow word-based searching (as per Chris Newman)?
The following changes since RFC 3501 were done so far: The following changes since RFC 3501 were done so far:
1. Folded in IMAP UNSELECT (RFC 3691), UIDPLUS (RFC 4315), ESEARCH 1. Folded in IMAP UNSELECT (RFC 3691), UIDPLUS (RFC 4315), ESEARCH
(RFC 4731), ENABLE (RFC 5161), IDLE (RFC 2177), SASL-IR (RFC (RFC 4731), ENABLE (RFC 5161), IDLE (RFC 2177), SASL-IR (RFC
4959) and MOVE (RFC 6851) extensions. Also folded RFC 5530. 4959) and MOVE (RFC 6851) extensions. Also folded RFC 5530 and
FETCH side of the BINARY extension (RFC 3516).
2. SEARCH command now requires to return ESEARCH response (SEARCH 2. Clarified that server should decode parameter value
continuations as described in [RFC2231]. This requirement was
hidden in RFC 2231 itself.
3. SEARCH command now requires to return ESEARCH response (SEARCH
response is now deprecated). response is now deprecated).
3. Added CLOSED response code from RFC 7162. 4. Added CLOSED response code from RFC 7162.
4. Updated to use modern TLS-related recommendations as per RFC 5. Updated to use modern TLS-related recommendations as per RFC
8314, RFC 7817, RFC 7525. 8314, RFC 7817, RFC 7525.
5. For future extensibility extended ABNF for tagged-ext-simple to 6. For future extensibility extended ABNF for tagged-ext-simple to
allow for bare number64. allow for bare number64.
6. Added SHOULD level requirement on IMAP servers to support 7. Added SHOULD level requirement on IMAP servers to support
$MDNSent and $Forwarded keywords. $MDNSent and $Forwarded keywords.
7. Added STATUS SIZE. 8. Added STATUS SIZE.
8. Mailbox names and message headers now allow for UTF-8. Support 9. Mailbox names and message headers now allow for UTF-8. Support
for Modified UTF-7 in mailbox names is not required, unless for Modified UTF-7 in mailbox names is not required, unless
compatibility with IMAP4rev1 is desired. compatibility with IMAP4rev1 is desired.
9. UNSEEN response code on SELECT/EXAMINE is now deprecated. 10. UNSEEN response code on SELECT/EXAMINE is now deprecated.
10. RECENT response on SELECT/EXAMINE, \Recent flag, RECENT STATUS 11. RECENT response on SELECT/EXAMINE, \Recent flag, RECENT STATUS
item are now deprecated. item are now deprecated.
Appendix C. Acknowledgement Appendix D. Acknowledgement
Earlier versions of this document were edited by Mark Crispin. Earlier versions of this document were edited by Mark Crispin.
Sadly, he is no longer available to help with this work. Editors of Sadly, he is no longer available to help with this work. Editors of
this revisions are hoping that Mark would have approved. this revisions are hoping that Mark would have approved.
Chris Newman has contributed text on I18N and use of UTF-8 in Chris Newman has contributed text on I18N and use of UTF-8 in
messages and mailbox names. messages and mailbox names.
Thank you to Tony Hansen for helping with the index generation. Thank you to Tony Hansen for helping with the index generation.
skipping to change at page 123, line 12 skipping to change at page 125, line 38
5161, RFC 6154 so work done by authors/editors of these documents is 5161, RFC 6154 so work done by authors/editors of these documents is
appreciated. appreciated.
Index Index
$ $
$Forwarded (predefined flag) 12 $Forwarded (predefined flag) 12
$MDNSent (predefined flag) 12 $MDNSent (predefined flag) 12
+ +
+FLAGS <flag list> 67 +FLAGS <flag list> 68
+FLAGS.SILENT <flag list> 67 +FLAGS.SILENT <flag list> 68
- -
-FLAGS <flag list> 67 -FLAGS <flag list> 68
-FLAGS.SILENT <flag list> 67 -FLAGS.SILENT <flag list> 68
A A
ALERT (response code) 74 ALERT (response code) 75
ALL (fetch item) 63 ALL (fetch item) 63
ALL (search key) 60 ALL (search key) 60
ALL (search result option) 59 ALL (search result option) 59
ALREADYEXISTS (response code) 74 ALREADYEXISTS (response code) 75
ANSWERED (search key) 60 ANSWERED (search key) 60
APPEND (command) 51 APPEND (command) 51
APPENDUID (response code) 74 APPENDUID (response code) 75
AUTHENTICATE (command) 27 AUTHENTICATE (command) 27
AUTHENTICATIONFAILED (response code) 75 AUTHENTICATIONFAILED (response code) 76
AUTHORIZATIONFAILED (response code) 75 AUTHORIZATIONFAILED (response code) 76
B B
BAD (response) 82 BAD (response) 83
BADCHARSET (response code) 76 BADCHARSET (response code) 76
BCC <string> (search key) 60 BCC <string> (search key) 60
BEFORE <date> (search key) 60 BEFORE <date> (search key) 60
BINARY.PEEK[<section-binary>]<<partial>> (fetch item) 64
BINARY.SIZE[<section-binary>] (fetch item) 64
BINARY.SIZE[<section-binary>] (fetch result) 92
BINARY[<section-binary>]<<number>> (fetch result) 92
BINARY[<section-binary>]<<partial>> (fetch item) 64
BODY (fetch item) 64 BODY (fetch item) 64
BODY (fetch result) 91 BODY (fetch result) 92
BODY <string> (search key) 60 BODY <string> (search key) 60
BODY.PEEK[<section>]<<partial>> (fetch item) 66 BODY.PEEK[<section>]<<partial>> (fetch item) 66
BODYSTRUCTURE (fetch item) 66 BODYSTRUCTURE (fetch item) 67
BODYSTRUCTURE (fetch result) 91 BODYSTRUCTURE (fetch result) 93
BODY[<section>]<<origin octet>> (fetch result) 91 BODY[<section>]<<origin octet>> (fetch result) 92
BODY[<section>]<<partial>> (fetch item) 64 BODY[<section>]<<partial>> (fetch item) 64
BYE (response) 83 BYE (response) 83
Body Structure (message attribute) 13 Body Structure (message attribute) 13
C C
CANNOT (response code) 76 CANNOT (response code) 77
CAPABILITY (command) 24 CAPABILITY (command) 24
CAPABILITY (response code) 76 CAPABILITY (response code) 77
CAPABILITY (response) 84 CAPABILITY (response) 84
CC <string> (search key) 60 CC <string> (search key) 60
CHECK (command) 56 CHECK (command) 56
CLIENTBUG (response code) 76 CLIENTBUG (response code) 77
CLOSE (command) 56 CLOSE (command) 56
CLOSED (response code) 76 CLOSED (response code) 77
CONTACTADMIN (response code) 77 CONTACTADMIN (response code) 78
COPY (command) 68 COPY (command) 68
COPYUID (response code) 77 COPYUID (response code) 78
CORRUPTION (response code) 77 CORRUPTION (response code) 78
COUNT (search result option) 59 COUNT (search result option) 59
CREATE (command) 35 CREATE (command) 35
D D
DELETE (command) 36 DELETE (command) 36
DELETED (search key) 60 DELETED (search key) 60
DRAFT (search key) 60 DRAFT (search key) 60
E E
ENABLE (command) 31 ENABLE (command) 31
ENVELOPE (fetch item) 66 ENVELOPE (fetch item) 67
ENVELOPE (fetch result) 94 ENVELOPE (fetch result) 96
ESEARCH (response) 88 ESEARCH (response) 89
EXAMINE (command) 35 EXAMINE (command) 35
EXPIRED (response code) 78 EXPIRED (response code) 78
EXPUNGE (command) 57 EXPUNGE (command) 57
EXPUNGE (response) 90 EXPUNGE (response) 91
EXPUNGEISSUED (response code) 78 EXPUNGEISSUED (response code) 79
Envelope Structure (message attribute) 13 Envelope Structure (message attribute) 13
F F
FAST (fetch item) 63 FAST (fetch item) 63
FETCH (command) 63 FETCH (command) 63
FETCH (response) 91 FETCH (response) 91
FLAGGED (search key) 60 FLAGGED (search key) 60
FLAGS (fetch item) 66 FLAGS (fetch item) 67
FLAGS (fetch result) 95 FLAGS (fetch result) 97
FLAGS (response) 89 FLAGS (response) 90
FLAGS <flag list> (store command data item) 67 FLAGS <flag list> (store command data item) 68
FLAGS.SILENT <flag list> (store command data item) 67 FLAGS.SILENT <flag list> (store command data item) 68
FROM <string> (search key) 60 FROM <string> (search key) 60
FULL (fetch item) 64 FULL (fetch item) 64
Flags (message attribute) 11 Flags (message attribute) 11
H H
HEADER (part specifier) 64 HEADER (part specifier) 65
HEADER <field-name> <string> (search key) 60 HEADER <field-name> <string> (search key) 60
HEADER.FIELDS (part specifier) 64 HEADER.FIELDS (part specifier) 65
HEADER.FIELDS.NOT (part specifier) 64 HEADER.FIELDS.NOT (part specifier) 65
I I
IDLE (command) 53 IDLE (command) 53
INTERNALDATE (fetch item) 66 INTERNALDATE (fetch item) 67
INTERNALDATE (fetch result) 95 INTERNALDATE (fetch result) 97
INUSE (response code) 78 INUSE (response code) 79
Internal Date (message attribute) 12 Internal Date (message attribute) 12
K K
KEYWORD <flag> (search key) 61 KEYWORD <flag> (search key) 61
Keyword (type of flag) 12 Keyword (type of flag) 12
L L
LARGER <n> (search key) 61 LARGER <n> (search key) 61
LIMIT (response code) 78 LIMIT (response code) 79
LIST (command) 41 LIST (command) 41
LIST (response) 85 LIST (response) 85
LOGOUT (command) 25 LOGOUT (command) 25
LSUB (command) 44 LSUB (command) 44
LSUB (response) 87 LSUB (response) 88
M M
MAX (search result option) 58 MAX (search result option) 58
MAY (specification requirement term) 5 MAY (specification requirement term) 5
MESSAGES (status item) 50 MESSAGES (status item) 50
MIME (part specifier) 65 MIME (part specifier) 65
MIN (search result option) 58 MIN (search result option) 58
MOVE (command) 69 MOVE (command) 69
MUST (specification requirement term) 5 MUST (specification requirement term) 5
MUST NOT (specification requirement term) 5 MUST NOT (specification requirement term) 5
Message Sequence Number (message attribute) 11 Message Sequence Number (message attribute) 11
N N
NAMESPACE (command) 45 NAMESPACE (command) 45
NAMESPACE (response) 88 NAMESPACE (response) 89
NEW (search key) 61 NEW (search key) 61
NO (response) 81 NO (response) 82
NONEXISTENT (response code) 78 NONEXISTENT (response code) 79
NOOP (command) 25 NOOP (command) 25
NOPERM (response code) 79 NOPERM (response code) 79
NOT <search-key> (search key) 61 NOT <search-key> (search key) 61
O O
OK (response) 81 OK (response) 82
ON <date> (search key) 61 ON <date> (search key) 61
OPTIONAL (specification requirement term) 5 OPTIONAL (specification requirement term) 5
OR <search-key1> <search-key2> (search key) 61 OR <search-key1> <search-key2> (search key) 61
OVERQUOTA (response code) 79 OVERQUOTA (response code) 80
P P
PARSE (response code) 79 PARSE (response code) 80
PERMANENTFLAGS (response code) 79 PERMANENTFLAGS (response code) 80
PREAUTH (response) 82 PREAUTH (response) 83
PRIVACYREQUIRED (response code) 79 PRIVACYREQUIRED (response code) 80
Permanent Flag (class of flag) 12 Permanent Flag (class of flag) 12
Predefined keywords 12 Predefined keywords 12
R R
READ-ONLY (response code) 80 READ-ONLY (response code) 81
READ-WRITE (response code) 80 READ-WRITE (response code) 81
RECOMMENDED (specification requirement term) 5 RECOMMENDED (specification requirement term) 5
RENAME (command) 38 RENAME (command) 38
REQUIRED (specification requirement term) 5 REQUIRED (specification requirement term) 5
RFC822 (fetch item) 66 RFC822 (fetch item) 67
RFC822 (fetch result) 95 RFC822 (fetch result) 97
RFC822.HEADER (fetch item) 66 RFC822.HEADER (fetch item) 67
RFC822.HEADER (fetch result) 95 RFC822.HEADER (fetch result) 97
RFC822.SIZE (fetch item) 66 RFC822.SIZE (fetch item) 67
RFC822.SIZE (fetch result) 95 RFC822.SIZE (fetch result) 97
RFC822.TEXT (fetch item) 66 RFC822.TEXT (fetch item) 67
RFC822.TEXT (fetch result) 95 RFC822.TEXT (fetch result) 97
S S
SEARCH (command) 58 SEARCH (command) 58
SEEN (search key) 61 SEEN (search key) 61
SELECT (command) 33 SELECT (command) 33
SENTBEFORE <date> (search key) 61 SENTBEFORE <date> (search key) 61
SENTON <date> (search key) 61 SENTON <date> (search key) 61
SENTSINCE <date> (search key) 61 SENTSINCE <date> (search key) 61
SERVERBUG (response code) 80 SERVERBUG (response code) 81
SHOULD (specification requirement term) 5 SHOULD (specification requirement term) 5
SHOULD NOT (specification requirement term) 5 SHOULD NOT (specification requirement term) 5
SINCE <date> (search key) 61 SINCE <date> (search key) 61
SIZE (status item) 51 SIZE (status item) 51
SMALLER <n> (search key) 61 SMALLER <n> (search key) 61
STARTTLS (command) 26 STARTTLS (command) 26
STATUS (command) 49 STATUS (command) 49
STATUS (response) 88 STATUS (response) 89
STORE (command) 66 STORE (command) 67
SUBJECT <string> (search key) 61 SUBJECT <string> (search key) 61
SUBSCRIBE (command) 40 SUBSCRIBE (command) 40
Session Flag (class of flag) 12 Session Flag (class of flag) 12
System Flag (type of flag) 11 System Flag (type of flag) 11
T T
TEXT (part specifier) 64 TEXT (part specifier) 65
TEXT <string> (search key) 61 TEXT <string> (search key) 61
TO <string> (search key) 61 TO <string> (search key) 61
TRYCREATE (response code) 80 TRYCREATE (response code) 81
U U
UID (command) 70 UID (command) 71
UID (fetch item) 66 UID (fetch item) 67
UID (fetch result) 95 UID (fetch result) 97
UID <sequence set> (search key) 62 UID <sequence set> (search key) 62
UIDNEXT (response code) 80 UIDNEXT (response code) 81
UIDNEXT (status item) 50 UIDNEXT (status item) 50
UIDNOTSTICKY (response code) 80 UIDNOTSTICKY (response code) 81
UIDVALIDITY (response code) 81 UIDVALIDITY (response code) 81
UIDVALIDITY (status item) 50 UIDVALIDITY (status item) 50
UNANSWERED (search key) 62 UNANSWERED (search key) 62
UNAVAILABLE (response code) 81 UNAVAILABLE (response code) 81
UNDELETED (search key) 62 UNDELETED (search key) 62
UNDRAFT (search key) 62 UNDRAFT (search key) 62
UNFLAGGED (search key) 62 UNFLAGGED (search key) 62
UNKEYWORD <flag> (search key) 62 UNKEYWORD <flag> (search key) 62
UNKNOWN-CTE (response code) 82
UNSEEN (search key) 62 UNSEEN (search key) 62
UNSEEN (status item) 50 UNSEEN (status item) 50
UNSELECT (command) 57 UNSELECT (command) 57
UNSUBSCRIBE (command) 41 UNSUBSCRIBE (command) 41
Unique Identifier (UID) (message attribute) 9 Unique Identifier (UID) (message attribute) 9
X X
X<atom> (command) 72 X<atom> (command) 73
[ [
[RFC-5322] Size (message attribute) 13 [RFC-5322] Size (message attribute) 13
\ \
\All (mailbox name attribute) 86 \All (mailbox name attribute) 87
\Answered (system flag) 11 \Answered (system flag) 11
\Archive (mailbox name attribute) 86 \Archive (mailbox name attribute) 87
\Deleted (system flag) 11 \Deleted (system flag) 11
\Draft (system flag) 12 \Draft (system flag) 12
\Drafts (mailbox name attribute) 86 \Drafts (mailbox name attribute) 87
\Flagged (mailbox name attribute) 86 \Flagged (mailbox name attribute) 87
\Flagged (system flag) 11 \Flagged (system flag) 11
\HasChildren (mailbox name attribute) 85 \HasChildren (mailbox name attribute) 86
\HasNoChildren (mailbox name attribute) 85 \HasNoChildren (mailbox name attribute) 86
\Junk (mailbox name attribute) 86 \Junk (mailbox name attribute) 87
\Marked (mailbox name attribute) 85 \Marked (mailbox name attribute) 86
\Noinferiors (mailbox name attribute) 85 \Noinferiors (mailbox name attribute) 86
\Noselect (mailbox name attribute) 85 \Noselect (mailbox name attribute) 86
\Recent (system flag) 12 \Recent (system flag) 12
\Seen (system flag) 11 \Seen (system flag) 11
\Sent (mailbox name attribute) 86 \Sent (mailbox name attribute) 87
\Trash (mailbox name attribute) 87 \Trash (mailbox name attribute) 87
\Unmarked (mailbox name attribute) 85 \Unmarked (mailbox name attribute) 86
Authors' Addresses Authors' Addresses
Alexey Melnikov (editor) Alexey Melnikov (editor)
Isode Ltd Isode Ltd
14 Castle Mews 14 Castle Mews
Hampton, Middlesex TW12 2NP Hampton, Middlesex TW12 2NP
UK UK
Email: Alexey.Melnikov@isode.com Email: Alexey.Melnikov@isode.com
 End of changes. 94 change blocks. 
163 lines changed or deleted 276 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/