Ergebnis für URL: http://www.faqs.org/rfcs/rfc2060.html [1]faqs.org
RFC 2060 - Internet Message Access Protocol - Version 4rev1
faqs.org
faqs.org - Internet FAQ Archives
RFC 2060 - Internet Message Access Protocol - Version 4rev1
* [2]Internet RFC Index
* [3]Usenet FAQ Index
* [4]Other FAQs
* [5]Documents
* [6]Tools
* Search
* [7]Search FAQs
* [8]Search RFCs
* IFC Home
* [9]Cities
* [10]Countries
* [11]Hospitals
* [12]Web Hosting Ratings
____________________________________________________________________________
Search the RFC Archives
____________________ Search
Or Display the document by number
_________ Display RFC By Number
____________________________________________________________________________
[ [13]RFC Index | [14]Usenet FAQs | [15]Web FAQs | [16]Documents | [17]Cities |
[18]SEC Filings | [19]Patents | [20]Restaurant inspections ]
Network Working Group M. Crispin
Request for Comments: 2060 University of Washington
Obsoletes: 1730 December 1996
Category: Standards Track
INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
The Internet Message Access Protocol, Version 4rev1 (IMAP4rev1)
allows a client to access and manipulate electronic mail messages on
a server. IMAP4rev1 permits manipulation of remote message folders,
called "mailboxes", in a way that is functionally equivalent to local
mailboxes. IMAP4rev1 also provides the capability for an offline
client to resynchronize with the server (see also [IMAP-DISC]).
IMAP4rev1 includes operations for creating, deleting, and renaming
mailboxes; checking for new messages; permanently removing messages;
setting and clearing flags; [[21]RFC-822] and [MIME-IMB] parsing;
searching; and selective fetching of message attributes, texts, and
portions thereof. Messages in IMAP4rev1 are accessed by the use of
numbers. These numbers are either message sequence numbers or unique
identifiers.
IMAP4rev1 supports a single server. A mechanism for accessing
configuration information to support multiple IMAP4rev1 servers is
discussed in [ACAP].
IMAP4rev1 does not specify a means of posting mail; this function is
handled by a mail transfer protocol such as [SMTP].
IMAP4rev1 is designed to be upwards compatible from the [IMAP2] and
unpublished IMAP2bis protocols. In the course of the evolution of
IMAP4rev1, some aspects in the earlier protocol have become obsolete.
Obsolete commands, responses, and data formats which an IMAP4rev1
implementation may encounter when used with an earlier implementation
are described in [IMAP-OBSOLETE].
Other compatibility issues with IMAP2bis, the most common variant of
the earlier protocol, are discussed in [IMAP-COMPAT]. A full
discussion of compatibility issues with rare (and presumed extinct)
variants of [IMAP2] is in [IMAP-HISTORICAL]; this document is
primarily of historical interest.
Table of Contents
IMAP4rev1 Protocol Specification .................................. 4
1. How to Read This Document ................................. 4
1.1. Organization of This Document ............................. 4
1.2. Conventions Used in This Document ......................... 4
2. Protocol Overview ......................................... 5
2.1. Link Level ................................................ 5
2.2. Commands and Responses .................................... 6
2.2.1. Client Protocol Sender and Server Protocol Receiver ....... 6
2.2.2. Server Protocol Sender and Client Protocol Receiver ....... 7
2.3. Message Attributes ........................................ 7
2.3.1. Message Numbers ........................................... 7
2.3.1.1. Unique Identifier (UID) Message Attribute ......... 7
2.3.1.2. Message Sequence Number Message Attribute ......... 9
2.3.2. Flags Message Attribute .................................... 9
2.3.3. Internal Date Message Attribute ........................... 10
2.3.4. [[22]RFC-822] Size Message Attribute .......................... 11
2.3.5. Envelope Structure Message Attribute ...................... 11
2.3.6. Body Structure Message Attribute .......................... 11
2.4. Message Texts ............................................. 11
3. State and Flow Diagram .................................... 11
3.1. Non-Authenticated State ................................... 11
3.2. Authenticated State ....................................... 11
3.3. Selected State ............................................ 12
3.4. Logout State .............................................. 12
4. Data Formats .............................................. 12
4.1. Atom ...................................................... 13
4.2. Number .................................................... 13
4.3. String ..................................................... 13
4.3.1. 8-bit and Binary Strings .................................. 13
4.4. Parenthesized List ........................................ 14
4.5. NIL ....................................................... 14
5. Operational Considerations ................................ 14
5.1. Mailbox Naming ............................................ 14
5.1.1. Mailbox Hierarchy Naming .................................. 14
5.1.2. Mailbox Namespace Naming Convention ....................... 14
5.1.3. Mailbox International Naming Convention ................... 15
5.2. Mailbox Size and Message Status Updates ................... 16
5.3. Response when no Command in Progress ...................... 16
5.4. Autologout Timer .......................................... 16
5.5. Multiple Commands in Progress ............................. 17
6. Client Commands ........................................... 17
6.1. Client Commands - Any State ............................... 18
6.1.1. CAPABILITY Command ........................................ 18
6.1.2. NOOP Command .............................................. 19
6.1.3. LOGOUT Command ............................................ 20
6.2. Client Commands - Non-Authenticated State ................. 20
6.2.1. AUTHENTICATE Command ...................................... 21
6.2.2. LOGIN Command ............................................. 22
6.3. Client Commands - Authenticated State ..................... 22
6.3.1. SELECT Command ............................................ 23
6.3.2. EXAMINE Command ........................................... 24
6.3.3. CREATE Command ............................................ 25
6.3.4. DELETE Command ............................................ 26
6.3.5. RENAME Command ............................................ 27
6.3.6. SUBSCRIBE Command ......................................... 29
6.3.7. UNSUBSCRIBE Command ....................................... 30
6.3.8. LIST Command .............................................. 30
6.3.9. LSUB Command .............................................. 32
6.3.10. STATUS Command ............................................ 33
6.3.11. APPEND Command ............................................ 34
6.4. Client Commands - Selected State .......................... 35
6.4.1. CHECK Command ............................................. 36
6.4.2. CLOSE Command ............................................. 36
6.4.3. EXPUNGE Command ........................................... 37
6.4.4. SEARCH Command ............................................ 37
6.4.5. FETCH Command ............................................. 41
6.4.6. STORE Command ............................................. 45
6.4.7. COPY Command .............................................. 46
6.4.8. UID Command ............................................... 47
6.5. Client Commands - Experimental/Expansion .................. 48
6.5.1. X Command ........................................... 48
7. Server Responses .......................................... 48
7.1. Server Responses - Status Responses ....................... 49
7.1.1. OK Response ............................................... 51
7.1.2. NO Response ............................................... 51
7.1.3. BAD Response .............................................. 52
7.1.4. PREAUTH Response .......................................... 52
7.1.5. BYE Response .............................................. 52
7.2. Server Responses - Server and Mailbox Status .............. 53
7.2.1. CAPABILITY Response ....................................... 53
7.2.2. LIST Response .............................................. 54
7.2.3. LSUB Response ............................................. 55
7.2.4 STATUS Response ........................................... 55
7.2.5. SEARCH Response ........................................... 55
7.2.6. FLAGS Response ............................................ 56
7.3. Server Responses - Mailbox Size ........................... 56
7.3.1. EXISTS Response ........................................... 56
7.3.2. RECENT Response ........................................... 57
7.4. Server Responses - Message Status ......................... 57
7.4.1. EXPUNGE Response .......................................... 57
7.4.2. FETCH Response ............................................ 58
7.5. Server Responses - Command Continuation Request ........... 63
8. Sample IMAP4rev1 connection ............................... 63
9. Formal Syntax ............................................. 64
10. Author's Note ............................................. 74
11. Security Considerations ................................... 74
12. Author's Address .......................................... 75
Appendices ........................................................ 76
A. References ................................................ 76
B. Changes from [23]RFC 1730 ..................................... 77
C. Key Word Index ............................................ 79
IMAP4rev1 Protocol Specification
1. How to Read This Document
1.1. Organization of This Document
This document is written from the point of view of the implementor of
an IMAP4rev1 client or server. Beyond the protocol overview in
section 2, it is not optimized for someone trying to understand the
operation of the protocol. The material in sections 3 through 5
provides the general context and definitions with which IMAP4rev1
operates.
Sections 6, 7, and 9 describe the IMAP commands, responses, and
syntax, respectively. The relationships among these are such that it
is almost impossible to understand any of them separately. In
particular, do not attempt to deduce command syntax from the command
section alone; instead refer to the Formal Syntax section.
1.2. Conventions Used in This Document
In examples, "C:" and "S:" indicate lines sent by the client and
server respectively.
The following terms are used in this document to signify the
requirements of this specification.
1) MUST, or the adjective REQUIRED, means that the definition is
an absolute requirement of the specification.
2) MUST NOT that the definition is an absolute prohibition of the
specification.
3) SHOULD means that there may exist valid reasons in particular
circumstances to ignore a particular item, but the full
implications MUST be understood and carefully weighed before
choosing a different course.
4) SHOULD NOT means that there may exist valid reasons in
particular circumstances when the particular behavior is
acceptable or even useful, but the full implications SHOULD be
understood and the case carefully weighed before implementing
any behavior described with this label.
5) MAY, or the adjective OPTIONAL, means that an item is truly
optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels
that it enhances the product while another vendor may omit the
same item. An implementation which does not include a
particular option MUST be prepared to interoperate with another
implementation which does include the option.
"Can" is used instead of "may" when referring to a possible
circumstance or situation, as opposed to an optional facility of
the protocol.
"User" is used to refer to a human user, whereas "client" refers
to the software being run by the user.
"Connection" refers to the entire sequence of client/server
interaction from the initial establishment of the network
connection until its termination. "Session" refers to the
sequence of client/server interaction from the time that a mailbox
is selected (SELECT or EXAMINE command) until the time that
selection ends (SELECT or EXAMINE of another mailbox, CLOSE
command, or connection termination).
Characters are 7-bit US-ASCII unless otherwise specified. Other
character sets are indicated using a "CHARSET", as described in
[MIME-IMT] and defined in [CHARSET]. CHARSETs have important
additional semantics in addition to defining character set; refer
to these documents for more detail.
2. Protocol Overview
2.1. Link Level
The IMAP4rev1 protocol assumes a reliable data stream such as
provided by TCP. When TCP is used, an IMAP4rev1 server listens on
port 143.
2.2. Commands and Responses
An IMAP4rev1 connection consists of the establishment of a
client/server network connection, an initial greeting from the
server, and client/server interactions. These client/server
interactions consist of a client command, server data, and a server
completion result response.
All interactions transmitted by client and server are in the form of
lines; that is, strings that end with a CRLF. The protocol receiver
of an IMAP4rev1 client or server is either reading a line, or is
reading a sequence of octets with a known count followed by a line.
2.2.1. Client Protocol Sender and Server Protocol Receiver
The client command begins an operation. Each client command is
prefixed with an identifier (typically a short alphanumeric string,
e.g. A0001, A0002, etc.) called a "tag". A different tag is
generated by the client for each command.
There are two cases in which a line from the client does not
represent a complete command. In one case, a command argument is
quoted with an octet count (see the description of literal in String
under Data Formats); in the other case, the command arguments require
server feedback (see the AUTHENTICATE command). In either case, the
server sends a command continuation request response if it is ready
for the octets (if appropriate) and the remainder of the command.
This response is prefixed with the token "+".
Note: If, instead, the server detected an error in the command, it
sends a BAD completion response with tag matching the command (as
described below) to reject the command and prevent the client from
sending any more of the command.
It is also possible for the server to send a completion response
for some other command (if multiple commands are in progress), or
untagged data. In either case, the command continuation request
is still pending; the client takes the appropriate action for the
response, and reads another response from the server. In all
cases, the client MUST send a complete command (including
receiving all command continuation request responses and command
continuations for the command) before initiating a new command.
The protocol receiver of an IMAP4rev1 server reads a command line
from the client, parses the command and its arguments, and transmits
server data and a server command completion result response.
2.2.2. Server Protocol Sender and Client Protocol Receiver
Data transmitted by the server to the client and status responses
that do not indicate command completion are prefixed with the token
"*", and are called untagged responses.
Server data MAY be sent as a result of a client command, or MAY be
sent unilaterally by the server. There is no syntactic difference
between server data that resulted from a specific command and server
data that were sent unilaterally.
The server completion result response indicates the success or
failure of the operation. It is tagged with the same tag as the
client command which began the operation. Thus, if more than one
command is in progress, the tag in a server completion response
identifies the command to which the response applies. There are
three possible server completion responses: OK (indicating success),
NO (indicating failure), or BAD (indicating protocol error such as
unrecognized command or command syntax error).
The protocol receiver of an IMAP4rev1 client reads a response line
from the server. It then takes action on the response based upon the
first token of the response, which can be a tag, a "*", or a "+".
A client MUST be prepared to accept any server response at all times.
This includes server data that was not requested. Server data SHOULD
be recorded, so that the client can reference its recorded copy
rather than sending a command to the server to request the data. In
the case of certain server data, the data MUST be recorded.
This topic is discussed in greater detail in the Server Responses
section.
2.3. Message Attributes
In addition to message text, each message has several attributes
associated with it. These attributes may be retrieved individually
or in conjunction with other attributes or message texts.
2.3.1. Message Numbers
Messages in IMAP4rev1 are accessed by one of two numbers; the unique
identifier and the message sequence number.
2.3.1.1. Unique Identifier (UID) Message Attribute
A 32-bit value assigned to each message, which when used with the
unique identifier validity value (see below) forms a 64-bit value
that is permanently guaranteed not to refer to any other message in
the mailbox. Unique identifiers are assigned in a strictly ascending
fashion in the mailbox; as each message is added to the mailbox it is
assigned a higher UID than the message(s) which were added
previously.
Unlike message sequence numbers, unique identifiers are not
necessarily contiguous. Unique identifiers also persist across
sessions. This permits a client to resynchronize its state from a
previous session with the server (e.g. disconnected or offline access
clients); this is discussed further in [IMAP-DISC].
Associated with every mailbox is a unique identifier validity value,
which is sent in an UIDVALIDITY response code in an OK untagged
response at mailbox selection time. If unique identifiers from an
earlier session fail to persist to this session, the unique
identifier validity value MUST be greater than the one used in the
earlier session.
Note: Unique identifiers MUST be strictly ascending in the mailbox
at all times. If the physical message store is re-ordered by a
non-IMAP agent, this requires that the unique identifiers in the
mailbox be regenerated, since the former unique identifers are no
longer strictly ascending as a result of the re-ordering. Another
instance in which unique identifiers are regenerated is if the
message store has no mechanism to store unique identifiers.
Although this specification recognizes that this may be
unavoidable in certain server environments, it STRONGLY ENCOURAGES
message store implementation techniques that avoid this problem.
Another cause of non-persistance is if the mailbox is deleted and
a new mailbox with the same name is created at a later date, Since
the name is the same, a client may not know that this is a new
mailbox unless the unique identifier validity is different. A
good value to use for the unique identifier validity value is a
32-bit representation of the creation date/time of the mailbox.
It is alright to use a constant such as 1, but only if it
guaranteed that unique identifiers will never be reused, even in
the case of a mailbox being deleted (or renamed) and a new mailbox
by the same name created at some future time.
The unique identifier of a message MUST NOT change during the
session, and SHOULD NOT change between sessions. However, if it is
not possible to preserve the unique identifier of a message in a
subsequent session, each subsequent session MUST have a new unique
identifier validity value that is larger than any that was used
previously.
2.3.1.2. Message Sequence Number Message Attribute
A relative position from 1 to the number of messages in the mailbox.
This position MUST be ordered by ascending unique identifier. As
each new message is added, it is assigned a message sequence number
that is 1 higher than the number of messages in the mailbox before
that new message was added.
Message sequence numbers can be reassigned during the session. For
example, when a message is permanently removed (expunged) from the
mailbox, the message sequence number for all subsequent messages is
decremented. Similarly, a new message can be assigned a message
sequence number that was once held by some other message prior to an
expunge.
In addition to accessing messages by relative position in the
mailbox, message sequence numbers can be used in mathematical
calculations. For example, if an untagged "EXISTS 11" is received,
and previously an untagged "8 EXISTS" was received, three new
messages have arrived with message sequence numbers of 9, 10, and 11.
Another example; if message 287 in a 523 message mailbox has UID
12345, there are exactly 286 messages which have lesser UIDs and 236
messages which have greater UIDs.
2.3.2. Flags Message Attribute
A list of zero or more named tokens associated with the message. A
flag is set by its addition to this list, and is cleared by its
removal. There are two types of flags in IMAP4rev1. A flag of
either type may be permanent or session-only.
A system flag is a flag name that is pre-defined in this
specification. All system flags begin with "\". Certain system
flags (\Deleted and \Seen) have special semantics described
elsewhere. The currently-defined system flags are:
\Seen Message has been read
\Answered Message has been answered
\Flagged Message is "flagged" for urgent/special attention
\Deleted Message is "deleted" for removal by later EXPUNGE
\Draft Message has not completed composition (marked as a
draft).
\Recent Message is "recently" arrived in this mailbox. This
session is the first session to have been notified
about this message; subsequent sessions will not see
\Recent set for this message. This flag can not be
altered by the client.
If it is not possible to determine whether or not
this session is the first session to be notified
about a message, then that message SHOULD be
considered recent.
If multiple connections have the same mailbox
selected simultaneously, it is undefined which of
these connections will see newly-arrives messages
with \Recent set and which will see it without
\Recent set.
A keyword is defined by the server implementation. Keywords do
not begin with "\". Servers MAY permit the client to define new
keywords in the mailbox (see the description of the
PERMANENTFLAGS response code for more information).
A flag may be permanent or session-only on a per-flag basis.
Permanent flags are those which the client can add or remove
from the message flags permanently; that is, subsequent sessions
will see any change in permanent flags. Changes to session
flags are valid only in that session.
Note: The \Recent system flag is a special case of a
session flag. \Recent can not be used as an argument in a
STORE command, and thus can not be changed at all.
2.3.3. Internal Date Message Attribute
The internal date and time of the message on the server. This is not
the date and time in the [[24]RFC-822] header, but rather a date and time
which reflects when the message was received. In the case of
messages delivered via [SMTP], this SHOULD be the date and time of
final delivery of the message as defined by [SMTP]. In the case of
messages delivered by the IMAP4rev1 COPY command, this SHOULD be the
internal date and time of the source message. In the case of
messages delivered by the IMAP4rev1 APPEND command, this SHOULD be
the date and time as specified in the APPEND command description.
All other cases are implementation defined.
2.3.4. [[25]RFC-822] Size Message Attribute
The number of octets in the message, as expressed in [[26]RFC-822]
format.
2.3.5. Envelope Structure Message Attribute
A parsed representation of the [[27]RFC-822] envelope information (not to
be confused with an [SMTP] envelope) of the message.
2.3.6. Body Structure Message Attribute
A parsed representation of the [MIME-IMB] body structure information
of the message.
2.4. Message Texts
In addition to being able to fetch the full [[28]RFC-822] text of a
message, IMAP4rev1 permits the fetching of portions of the full
message text. Specifically, it is possible to fetch the [[29]RFC-822]
message header, [[30]RFC-822] message body, a [MIME-IMB] body part, or a
[MIME-IMB] header.
3. State and Flow Diagram
An IMAP4rev1 server is in one of four states. Most commands are
valid in only certain states. It is a protocol error for the client
to attempt a command while the command is in an inappropriate state.
In this case, a server will respond with a BAD or NO (depending upon
server implementation) command completion result.
3.1. Non-Authenticated State
In non-authenticated state, the client MUST supply authentication
credentials before most commands will be permitted. This state is
entered when a connection starts unless the connection has been pre-
authenticated.
3.2. Authenticated State
In authenticated state, the client is authenticated and MUST select a
mailbox to access before commands that affect messages will be
permitted. This state is entered when a pre-authenticated connection
starts, when acceptable authentication credentials have been
provided, or after an error in selecting a mailbox.
3.3. Selected State
In selected state, a mailbox has been selected to access. This state
is entered when a mailbox has been successfully selected.
3.4. Logout State
In logout state, the connection is being terminated, and the server
will close the connection. This state can be entered as a result of
a client request or by unilateral server decision.
+--------------------------------------+
|initial connection and server greeting|
+--------------------------------------+
|| (1) || (2) || (3)
VV || ||
+-----------------+ || ||
|non-authenticated| || ||
+-----------------+ || ||
|| (7) || (4) || ||
|| VV VV ||
|| +----------------+ ||
|| | authenticated | ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
"QUOTED-PRINTABLE") date_text date_day_fixed "-" date_month "-" date_year
SPACE time SPACE zone QUOTED_CHAR ("APPLICATION" / "AUDIO" / "IMAGE" /
"MESSAGE" / "VIDEO") "MESSAGE" "[93]RFC822" "TEXT" *QUOTED_CHAR / "\"
rename ::= "RENAME" SPACE mailbox SPACE mailbox
;; Use of INBOX as a destination gives a NO error
response ::= *(continue_req / response_data) response_done
response_data ::= "*" SPACE (resp_cond_state / resp_cond_bye /
mailbox_data / message_data / capability_data)
CRLF
response_done ::= response_tagged / response_fatal
response_fatal ::= "*" SPACE resp_cond_bye CRLF
;; Server closes connection immediately
response_tagged ::= tag SPACE resp_cond_state CRLF
resp_cond_auth ::= ("OK" / "PREAUTH") SPACE resp_text
;; Authentication condition
resp_cond_bye ::= "BYE" SPACE resp_text
resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text
;; Status condition
resp_text ::= ["[" resp_text_code "]" SPACE] (text_mime2 / text)
;; text SHOULD NOT begin with "[" or "="
resp_text_code ::= "ALERT" / "PARSE" /
"PERMANENTFLAGS" SPACE "(" #(flag / "\*") ")" /
"READ-ONLY" / "READ-WRITE" / "TRYCREATE" /
"UIDVALIDITY" SPACE nz_number /
"UNSEEN" SPACE nz_number /
atom [SPACE 1*]
search ::= "SEARCH" SPACE ["CHARSET" SPACE astring SPACE]
1#search_key
;; [CHARSET] MUST be registered with IANA
search_key ::= "ALL" / "ANSWERED" / "BCC" SPACE astring /
"BEFORE" SPACE date / "BODY" SPACE astring /
"CC" SPACE astring / "DELETED" / "FLAGGED" /
"FROM" SPACE astring /
"KEYWORD" SPACE flag_keyword / "NEW" / "OLD" /
"ON" SPACE date / "RECENT" / "SEEN" /
"SINCE" SPACE date / "SUBJECT" SPACE astring /
"TEXT" SPACE astring / "TO" SPACE astring /
"UNANSWERED" / "UNDELETED" / "UNFLAGGED" /
"UNKEYWORD" SPACE flag_keyword / "UNSEEN" /
;; Above this line were in [IMAP2]
"DRAFT" /
"HEADER" SPACE header_fld_name SPACE astring /
"LARGER" SPACE number / "NOT" SPACE search_key /
"OR" SPACE search_key SPACE search_key /
"SENTBEFORE" SPACE date / "SENTON" SPACE date /
"SENTSINCE" SPACE date / "SMALLER" SPACE number /
"UID" SPACE set / "UNDRAFT" / set /
"(" 1#search_key ")"
section ::= "[" [section_text / (nz_number *["". nz_number]
["". (section_text / "MIME")])] "]"
section_text ::= "HEADER" / "HEADER.FIELDS" [".NOT"]
SPACE header_list / "TEXT"
select ::= "SELECT" SPACE mailbox
sequence_num ::= nz_number / "*"
;; * is the largest number in use. For message
;; sequence numbers, it is the number of messages
;; in the mailbox. For unique identifiers, it is
;; the unique identifier of the last message in
;; the mailbox.
set ::= sequence_num / (sequence_num ":" sequence_num) /
(set "," set)
;; Identifies a set of messages. For message
;; sequence numbers, these are consecutive
;; numbers from 1 to the number of messages in
;; the mailbox
;; Comma delimits individual numbers, colon
;; delimits between two numbers inclusive.
;; Example: 2,4:7,9,12:* is 2,4,5,6,7,9,12,13,
;; 14,15 for a mailbox with 15 messages.
SPACE ::=
status ::= "STATUS" SPACE mailbox SPACE "(" 1#status_att ")"
status_att ::= "MESSAGES" / "RECENT" / "UIDNEXT" / "UIDVALIDITY" /
"UNSEEN"
store ::= "STORE" SPACE set SPACE store_att_flags
store_att_flags ::= (["+" / "-"] "FLAGS" [".SILENT"]) SPACE
(flag_list / #flag)
string ::= quoted / literal
subscribe ::= "SUBSCRIBE" SPACE mailbox
tag ::= 1*
text ::= 1*TEXT_CHAR
text_mime2 ::= "=?" "?" "?"
"?="
;; Syntax defined in [MIME-HDRS]
TEXT_CHAR ::=
time ::= 2digit ":" 2digit ":" 2digit
;; Hours minutes seconds
uid ::= "UID" SPACE (copy / fetch / search / store)
;; Unique identifiers used instead of message
;; sequence numbers
uniqueid ::= nz_number
;; Strictly ascending
unsubscribe ::= "UNSUBSCRIBE" SPACE mailbox
userid ::= astring
x_command ::= "X" atom
zone ::= ("+" / "-") 4digit
;; Signed four-digit value of hhmm representing
;; hours and minutes west of Greenwich (that is,
;; (the amount that the given time differs from
;; Universal Time). Subtracting the timezone
;; from the given time will give the UT form.
;; The Universal Time zone is "+0000".
10. Author's Note
This document is a revision or rewrite of earlier documents, and
supercedes the protocol specification in those documents: [96]RFC 1730,
unpublished IMAP2bis.TXT document, [97]RFC 1176, and [98]RFC 1064.
11. Security Considerations
IMAP4rev1 protocol transactions, including electronic mail data, are
sent in the clear over the network unless privacy protection is
negotiated in the AUTHENTICATE command.
A server error message for an AUTHENTICATE command which fails due to
invalid credentials SHOULD NOT detail why the credentials are
invalid.
Use of the LOGIN command sends passwords in the clear. This can be
avoided by using the AUTHENTICATE command instead.
A server error message for a failing LOGIN command SHOULD NOT specify
that the user name, as opposed to the password, is invalid.
Additional security considerations are discussed in the section
discussing the AUTHENTICATE and LOGIN commands.
12. 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: [99]MRC@CAC.Washington.EDU
Appendices
A. References
[ACAP] Myers, J. "ACAP -- Application Configuration Access Protocol",
Work in Progress.
[CHARSET] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
[100]RFC 1700, USC/Information Sciences Institute, October 1994.
[DISPOSITION] Troost, R., and Dorner, S., "Communicating Presentation
Information in Internet Messages: The Content-Disposition Header",
[101]RFC 1806, June 1995.
[IMAP-AUTH] Myers, J., "IMAP4 Authentication Mechanism", [102]RFC 1731.
Carnegie-Mellon University, December 1994.
[IMAP-COMPAT] Crispin, M., "IMAP4 Compatibility with IMAP2bis", RFC
2061, University of Washington, November 1996.
[IMAP-DISC] Austein, R., "Synchronization Operations for Disconnected
IMAP4 Clients", Work in Progress.
[IMAP-HISTORICAL] Crispin, M. "IMAP4 Compatibility with IMAP2 and
IMAP2bis", [103]RFC 1732, University of Washington, December 1994.
[IMAP-MODEL] Crispin, M., "Distributed Electronic Mail Models in
IMAP4", [104]RFC 1733, University of Washington, December 1994.
[IMAP-OBSOLETE] Crispin, M., "Internet Message Access Protocol -
Obsolete Syntax", [105]RFC 2062, University of Washington, November 1996.
[IMAP2] Crispin, M., "Interactive Mail Access Protocol - Version 2",
[106]RFC 1176, University of Washington, August 1990.
[LANGUAGE-TAGS] Alvestrand, H., "Tags for the Identification of
Languages", [107]RFC 1766, March 1995.
[MD5] Myers, J., and M. Rose, "The Content-MD5 Header Field", RFC
1864, October 1995.
[MIME-IMB] Freed, N., and N. Borenstein, "MIME (Multipurpose Internet
Mail Extensions) Part One: Format of Internet Message Bodies", RFC
2045, November 1996.
[MIME-IMT] Freed, N., and N. Borenstein, "MIME (Multipurpose
Internet Mail Extensions) Part Two: Media Types", [108]RFC 2046,
November 1996.
[MIME-HDRS] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
Part Three: Message Header Extensions for Non-ASCII Text", RFC
2047, November 1996.
[[109]RFC-822] Crocker, D., "Standard for the Format of ARPA Internet Text
Messages", STD 11, [110]RFC 822, University of Delaware, August 1982.
[SMTP] Postel, J., "Simple Mail Transfer Protocol", STD 10,
[111]RFC 821, USC/Information Sciences Institute, August 1982.
[UTF-7] Goldsmith, D., and Davis, M., "UTF-7: A Mail-Safe
Transformation Format of Unicode", [112]RFC 1642, July 1994.
B. Changes from [113]RFC 1730
1) The STATUS command has been added.
2) Clarify in the formal syntax that the "#" construct can never
refer to multiple spaces.
3) Obsolete syntax has been moved to a separate document.
4) The PARTIAL command has been obsoleted.
5) The [114]RFC822.HEADER.LINES, [115]RFC822.HEADER.LINES.NOT, [116]RFC822.PEEK, and
[117]RFC822.TEXT.PEEK fetch attributes have been obsoleted.
6) The "" suffix for BODY text attributes has
been added.
7) The HEADER, HEADER.FIELDS, HEADER.FIELDS.NOT, MIME, and TEXT part
specifiers have been added.
8) Support for Content-Disposition and Content-Language has been
added.
9) The restriction on fetching nested MULTIPART parts has been
removed.
10) Body part number 0 has been obsoleted.
11) Server-supported authenticators are now identified by
capabilities.
12) The capability that identifies this protocol is now called
"IMAP4rev1". A server that provides backwards support for [118]RFC 1730
SHOULD emit the "IMAP4" capability in addition to "IMAP4rev1" in its
CAPABILITY response. Because [119]RFC-1730 required "IMAP4" to appear as
the first capability, it MUST listed first in the response.
13) A description of the mailbox name namespace convention has been
added.
14) A description of the international mailbox name convention has
been added.
15) The UID-NEXT and UID-VALIDITY status items are now called UIDNEXT
and UIDVALIDITY. This is a change from the IMAP STATUS
Work in Progress and not from [120]RFC-1730
16) Add a clarification that a null mailbox name argument to the LIST
command returns an untagged LIST response with the hierarchy
delimiter and root of the reference argument.
17) Define terms such as "MUST", "SHOULD", and "MUST NOT".
18) Add a section which defines message attributes and more
thoroughly details the semantics of message sequence numbers, UIDs,
and flags.
19) Add a clarification detailing the circumstances when a client may
send multiple commands without waiting for a response, and the
circumstances in which ambiguities may result.
20) Add a recommendation on server behavior for DELETE and RENAME
when inferior hierarchical names of the given name exist.
21) Add a clarification that a mailbox name may not be unilaterally
unsubscribed by the server, even if that mailbox name no longer
exists.
22) Add a clarification that LIST should return its results quickly
without undue delay.
23) Add a clarification that the date_time argument to APPEND sets
the internal date of the message.
24) Add a clarification on APPEND behavior when the target mailbox is
the currently selected mailbox.
25) Add a clarification that external changes to flags should be
always announced via an untagged FETCH even if the current command is
a STORE with the ".SILENT" suffix.
26) Add a clarification that COPY appends to the target mailbox.
27) Add the NEWNAME response code.
28) Rewrite the description of the untagged BYE response to clarify
its semantics.
29) Change the reference for the body MD5 to refer to the proper RFC.
30) Clarify that the formal syntax contains rules which may overlap,
and that in the event of such an overlap the rule which occurs first
takes precedence.
31) Correct the definition of body_fld_param.
32) More formal syntax for capability_data.
33) Clarify that any case variant of "INBOX" must be interpreted as
INBOX.
34) Clarify that the human-readable text in resp_text should not
begin with "[" or "=".
35) Change MIME references to Draft Standard documents.
36) Clarify \Recent semantics.
37) Additional examples.
C. Key Word Index
+FLAGS (store command data item) ............... 45
+FLAGS.SILENT (store command data item) ........ 46
-FLAGS (store command data item) ............... 46
-FLAGS.SILENT (store command data item) ........ 46
ALERT (response code) ...................................... 50
ALL (fetch item) ........................................... 41
ALL (search key) ........................................... 38
ANSWERED (search key) ...................................... 38
APPEND (command) ........................................... 34
AUTHENTICATE (command) ..................................... 20
BAD (response) ............................................. 52
BCC (search key) .................................. 38
BEFORE (search key) ................................. 39
BODY (fetch item) .......................................... 41
BODY (fetch result) ........................................ 58
BODY (search key) ................................. 39
BODY.PEEK[] (fetch item) ............... 44
BODYSTRUCTURE (fetch item) ................................. 44
BODYSTRUCTURE (fetch result) ............................... 59
BODY[] (fetch result) ............. 58
BODY[] (fetch item) .................... 41
BYE (response) ............................................. 52
Body Structure (message attribute) ......................... 11
CAPABILITY (command) ....................................... 18
CAPABILITY (response) ...................................... 53
CC (search key) ................................... 39
CHECK (command) ............................................ 36
CLOSE (command) ............................................ 36
COPY (command) ............................................. 46
CREATE (command) ........................................... 25
DELETE (command) ........................................... 26
DELETED (search key) ....................................... 39
DRAFT (search key) ......................................... 39
ENVELOPE (fetch item) ...................................... 44
ENVELOPE (fetch result) .................................... 62
EXAMINE (command) .......................................... 24
EXISTS (response) .......................................... 56
EXPUNGE (command) .......................................... 37
EXPUNGE (response) ......................................... 57
Envelope Structure (message attribute) ..................... 11
FAST (fetch item) .......................................... 44
FETCH (command) ............................................ 41
FETCH (response) ........................................... 58
FLAGGED (search key) ....................................... 39
FLAGS (fetch item) ......................................... 44
FLAGS (fetch result) ....................................... 62
FLAGS (response) ........................................... 56
FLAGS (store command data item) ................ 45
FLAGS.SILENT (store command data item) ......... 45
FROM (search key) ................................. 39
FULL (fetch item) .......................................... 44
Flags (message attribute) .................................. 9
HEADER (part specifier) .................................... 41
HEADER (search key) .................. 39
HEADER.FIELDS (part specifier) ............... 41
HEADER.FIELDS.NOT (part specifier) ........... 41
INTERNALDATE (fetch item) .................................. 44
INTERNALDATE (fetch result) ................................ 62
Internal Date (message attribute) .......................... 10
KEYWORD (search key) ................................ 39
Keyword (type of flag) ..................................... 10
LARGER (search key) .................................... 39
LIST (command) ............................................. 30
LIST (response) ............................................ 54
LOGIN (command) ............................................ 22
LOGOUT (command) ........................................... 20
LSUB (command) ............................................. 32
LSUB (response) ............................................ 55
MAY (specification requirement term) ....................... 5
MESSAGES (status item) ..................................... 33
MIME (part specifier) ...................................... 42
MUST (specification requirement term) ...................... 4
MUST NOT (specification requirement term) .................. 4
Message Sequence Number (message attribute) ................ 9
NEW (search key) ........................................... 39
NEWNAME (response code) .................................... 50
NO (response) .............................................. 51
NOOP (command) ............................................. 19
NOT (search key) .............................. 39
OK (response) .............................................. 51
OLD (search key) ........................................... 39
ON (search key) ..................................... 39
OPTIONAL (specification requirement term) .................. 5
OR (search key) ................ 39
PARSE (response code) ...................................... 50
PERMANENTFLAGS (response code) ............................. 50
PREAUTH (response) ......................................... 52
Permanent Flag (class of flag) ............................. 10
READ-ONLY (response code) .................................. 50
READ-WRITE (response code) ................................. 50
RECENT (response) .......................................... 57
RECENT (search key) ........................................ 39
RECENT (status item) ....................................... 33
RENAME (command) ........................................... 27
REQUIRED (specification requirement term) .................. 4
[121]RFC822 (fetch item) ........................................ 44
[122]RFC822 (fetch result) ...................................... 63
[123]RFC822.HEADER (fetch item) ................................. 44
[124]RFC822.HEADER (fetch result) ............................... 62
[125]RFC822.SIZE (fetch item) ................................... 44
[126]RFC822.SIZE (fetch result) ................................. 62
[127]RFC822.TEXT (fetch item) ................................... 44
[128]RFC822.TEXT (fetch result) ................................. 62
SEARCH (command) ........................................... 37
SEARCH (response) .......................................... 55
SEEN (search key) .......................................... 40
SELECT (command) ........................................... 23
SENTBEFORE (search key) ............................. 40
SENTON (search key) ................................. 40
SENTSINCE (search key) .............................. 40
SHOULD (specification requirement term) .................... 5
SHOULD NOT (specification requirement term) ................ 5
SINCE (search key) .................................. 40
SMALLER (search key) ................................... 40
STATUS (command) ........................................... 33
STATUS (response) .......................................... 55
STORE (command) ............................................ 45
SUBJECT (search key) .............................. 40
SUBSCRIBE (command) ........................................ 29
Session Flag (class of flag) ............................... 10
System Flag (type of flag) ................................. 9
TEXT (part specifier) ...................................... 42
TEXT (search key) ................................. 40
TO (search key) ................................... 40
TRYCREATE (response code) .................................. 51
UID (command) .............................................. 47
UID (fetch item) ........................................... 44
UID (fetch result) ......................................... 63
UID (search key) ............................. 40
UIDNEXT (status item) ...................................... 33
UIDVALIDITY (response code) ................................ 51
UIDVALIDITY (status item) .................................. 34
UNANSWERED (search key) .................................... 40
UNDELETED (search key) ..................................... 40
UNDRAFT (search key) ....................................... 40
UNFLAGGED (search key) ..................................... 40
UNKEYWORD (search key) .............................. 40
UNSEEN (response code) ..................................... 51
UNSEEN (search key) ........................................ 40
UNSEEN (status item) ....................................... 34
UNSUBSCRIBE (command) ...................................... 30
Unique Identifier (UID) (message attribute) ................ 7
X (command) .......................................... 48
[[129]RFC-822] Size (message attribute) ......................... 11
\Answered (system flag) .................................... 9
\Deleted (system flag) ..................................... 9
\Draft (system flag) ....................................... 9
\Flagged (system flag) ..................................... 9
\Marked (mailbox name attribute) ........................... 54
\Noinferiors (mailbox name attribute) ...................... 54
\Noselect (mailbox name attribute) ......................... 54
\Recent (system flag) ...................................... 10
\Seen (system flag) ........................................ 9
\Unmarked (mailbox name attribute) ......................... 54
User Contributions:
Comment about this RFC, ask questions, or add new information about this topic:
Name: ____________________
E-mail: ____________________
[ ] Show my email publicly
Public Comment: (50-4000 characters)
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
(BUTTON) Send comment
Previous: [130]RFC 2059 - RADIUS Accounting
Next: [131]RFC 2061 - IMAP4 Compatibility with IMAP2bis
[ [132]RFC Index | [133]Usenet FAQs | [134]Web FAQs | [135]Documents |
[136]Cities | [137]Restaurant inspections ]
____________________________________________________________________________
Some parts © 2024 Advameg, Inc. |
References
1. http://www.faqs.org/
2. http://www.faqs.org/rfcs/
3. http://www.faqs.org/faqs/
4. http://www.faqs.org/contrib/
5. http://www.faqs.org/docs/
6. http://www.faqs.org/tools/
7. http://www.faqs.org/faqs/faqsearch.html
8. http://www.faqs.org/rfcs/rfcsearch.html
9. http://www.city-data.com/
10. http://www.country-data.com/
11. http://www.hospital-data.com/
12. http://www.webhostingratings.com/
13. http://www.faqs.org/rfcs/
14. http://www.faqs.org/faqs/
15. http://www.faqs.org/contrib/
16. http://www.faqs.org/docs/
17. http://www.city-data.com/
18. http://www.faqs.org/sec-filings/
19. http://www.faqs.org/patents/
20. http://www.city-data.com/restaurant-inspections.html
21. http://www.faqs.org/rfcs/rfc822.html
22. http://www.faqs.org/rfcs/rfc822.html
23. http://www.faqs.org/rfcs/rfc1730.html
24. http://www.faqs.org/rfcs/rfc822.html
25. http://www.faqs.org/rfcs/rfc822.html
26. http://www.faqs.org/rfcs/rfc822.html
27. http://www.faqs.org/rfcs/rfc822.html
28. http://www.faqs.org/rfcs/rfc822.html
29. http://www.faqs.org/rfcs/rfc822.html
30. http://www.faqs.org/rfcs/rfc822.html
31. http://www.faqs.org/rfcs/rfc822.html
32. http://www.faqs.org/rfcs/rfc822.html
33. mailto:foobar@Blurdybloop.COM
34. mailto:mooch@owatagu.siam.edu
35. http://www.faqs.org/rfcs/rfc822.html
36. http://www.faqs.org/rfcs/rfc822.html
37. http://www.faqs.org/rfcs/rfc822.html
38. http://www.faqs.org/rfcs/rfc822.html
39. http://www.faqs.org/rfcs/rfc822.html
40. http://www.faqs.org/rfcs/rfc822.html
41. http://www.faqs.org/rfcs/rfc822.html
42. http://www.faqs.org/rfcs/rfc822.html
43. http://www.faqs.org/rfcs/rfc822.html
44. http://www.faqs.org/rfcs/rfc822.html
45. http://www.faqs.org/rfcs/rfc822.html
46. http://www.faqs.org/rfcs/rfc822.html
47. http://www.faqs.org/rfcs/rfc822.html
48. http://www.faqs.org/rfcs/rfc822.html
49. http://www.faqs.org/rfcs/rfc822.html
50. http://www.faqs.org/rfcs/rfc822.html
51. http://www.faqs.org/rfcs/rfc822.html
52. http://www.faqs.org/rfcs/rfc822.html
53. http://www.faqs.org/rfcs/rfc822.html
54. http://www.faqs.org/rfcs/rfc822.html
55. http://www.faqs.org/rfcs/rfc822.html
56. http://www.faqs.org/rfcs/rfc822.html
57. http://www.faqs.org/rfcs/rfc822.html
58. http://www.faqs.org/rfcs/rfc822.html
59. http://www.faqs.org/rfcs/rfc822.html
60. http://www.faqs.org/rfcs/rfc822.html
61. http://www.faqs.org/rfcs/rfc822.html
62. http://www.faqs.org/rfcs/rfc822.html
63. http://www.faqs.org/rfcs/rfc822.html
64. http://www.faqs.org/rfcs/rfc822.html
65. mailto:960723163407.20117h@cac.washington.edu
66. http://www.faqs.org/rfcs/rfc822.html
67. http://www.faqs.org/rfcs/rfc822.html
68. http://www.faqs.org/rfcs/rfc822.html
69. http://www.faqs.org/rfcs/rfc822.html
70. http://www.faqs.org/rfcs/rfc822.html
71. http://www.faqs.org/rfcs/rfc822.html
72. http://www.faqs.org/rfcs/rfc822.html
73. http://www.faqs.org/rfcs/rfc822.html
74. http://www.faqs.org/rfcs/rfc822.html
75. http://www.faqs.org/rfcs/rfc822.html
76. http://www.faqs.org/rfcs/rfc822.html
77. mailto:B27397-0100000@cac.washington.edu
78. mailto:gray@cac.washington.edu
79. mailto:imap@cac.washington.edu
80. mailto:minutes@CNRI.Reston.VA.US
81. mailto:KLENSIN@INFOODS.MIT.EDU
82. http://www.faqs.org/rfcs/rfc822.html
83. http://www.faqs.org/rfcs/rfc822.html
84. http://www.faqs.org/rfcs/rfc822.html
85. http://www.faqs.org/rfcs/rfc822.html
86. http://www.faqs.org/rfcs/rfc822.html
87. http://www.faqs.org/rfcs/rfc822.html
88. http://www.faqs.org/rfcs/rfc822.html
89. http://www.faqs.org/rfcs/rfc822.html
90. http://www.faqs.org/rfcs/rfc822.html
91. http://www.faqs.org/rfcs/rfc1730.html
92. http://www.faqs.org/rfcs/rfc822.html
93. http://www.faqs.org/rfcs/rfc822.html
94. http://www.faqs.org/rfcs/rfc822.html
95. http://www.faqs.org/rfcs/rfc822.html
96. http://www.faqs.org/rfcs/rfc1730.html
97. http://www.faqs.org/rfcs/rfc1176.html
98. http://www.faqs.org/rfcs/rfc1064.html
99. mailto:MRC@CAC.Washington.EDU
100. http://www.faqs.org/rfcs/rfc1700.html
101. http://www.faqs.org/rfcs/rfc1806.html
102. http://www.faqs.org/rfcs/rfc1731.html
103. http://www.faqs.org/rfcs/rfc1732.html
104. http://www.faqs.org/rfcs/rfc1733.html
105. http://www.faqs.org/rfcs/rfc2062.html
106. http://www.faqs.org/rfcs/rfc1176.html
107. http://www.faqs.org/rfcs/rfc1766.html
108. http://www.faqs.org/rfcs/rfc2046.html
109. http://www.faqs.org/rfcs/rfc822.html
110. http://www.faqs.org/rfcs/rfc822.html
111. http://www.faqs.org/rfcs/rfc821.html
112. http://www.faqs.org/rfcs/rfc1642.html
113. http://www.faqs.org/rfcs/rfc1730.html
114. http://www.faqs.org/rfcs/rfc822.html
115. http://www.faqs.org/rfcs/rfc822.html
116. http://www.faqs.org/rfcs/rfc822.html
117. http://www.faqs.org/rfcs/rfc822.html
118. http://www.faqs.org/rfcs/rfc1730.html
119. http://www.faqs.org/rfcs/rfc1730.html
120. http://www.faqs.org/rfcs/rfc1730.html
121. http://www.faqs.org/rfcs/rfc822.html
122. http://www.faqs.org/rfcs/rfc822.html
123. http://www.faqs.org/rfcs/rfc822.html
124. http://www.faqs.org/rfcs/rfc822.html
125. http://www.faqs.org/rfcs/rfc822.html
126. http://www.faqs.org/rfcs/rfc822.html
127. http://www.faqs.org/rfcs/rfc822.html
128. http://www.faqs.org/rfcs/rfc822.html
129. http://www.faqs.org/rfcs/rfc822.html
130. http://www.faqs.org/rfcs/rfc2059.html
131. http://www.faqs.org/rfcs/rfc2061.html
132. http://www.faqs.org/rfcs/
133. http://www.faqs.org/faqs/
134. http://www.faqs.org/contrib/
135. http://www.faqs.org/docs/
136. http://www.city-data.com/
137. http://www.city-data.com/restaurant-inspections.html
Usage: http://www.kk-software.de/kklynxview/get/URL
e.g. http://www.kk-software.de/kklynxview/get/http://www.kk-software.de
Errormessages are in German, sorry ;-)