rfc1176.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,616 行 · 第 1/5 页
TXT
1,616 行
* MAILBOX FOOBAR
* MAILBOX GENERAL
A002 FIND completed
Although the use of explicit file or path names for mailboxes is
discouraged by this standard, it may be unavoidable. It is
important that the value returned in the MAILBOX unsolicited reply
be usable in the SELECT command without remembering any path
specification that may have been used in the FIND MAILBOXES
pattern.
Support for FIND MAILBOXES is optional. If a client's attempt
returns BAD as a response then the client can make no assumptions
about what mailboxes exist on the server other than INBOX.
tag FIND BBOARDS pattern
The FIND BBOARDS command accepts as an argument a pattern that
specifies some set of bulletin board names that are usable by the
BBOARD command. Wildcards are permitted as in FIND MAILBOXES.
The FIND BBOARDS command will return some set of unsolicited
Crispin [Page 12]
RFC 1176 IMAP2 August 1990
BBOARD replies that have as their value a single bulletin board
name.
EXAMPLE: A002 FIND BBOARDS *
* BBOARD FOOBAR
* BBOARD GENERAL
A002 FIND completed
Support for FIND BBOARDS is optional. If a client's attempt
returns BAD as a response then the client can make no assumptions
about what bulletin boards exist on the server, or that they exist
at all.
tag CHECK
The CHECK command forces a check for new messages and a rescan of
the mailbox for internal change for those implementations that
allow multiple simultaneous read/write access to the same mailbox.
It is recommend that periodic implicit checks for new mail be done
by servers as well. The server should send unsolicited EXISTS and
RECENT responses with the current status before returning an OK to
the client.
tag EXPUNGE
The EXPUNGE command permanently removes all messages with the
\DELETED flag set in its flags from the mailbox. Before returning
an OK to the client, for each message that is removed, an
unsolicited EXPUNGE response is sent. The message number for each
successive message in the mailbox is immediately decremented by 1;
this means that if the last 5 messages in a 9-message mail file
are expunged you will receive 5 unsolicited EXPUNGE responses for
message 5. To ensure mailbox integrity and server/client
synchronization, it is recommended that the server do an implicit
check before commencing the expunge and again when the expunge is
completed. Furthermore, if the server allows multiple
simultaneous access to the same mail file the server must lock the
mail file for exclusive access while an expunge is taking place.
EXPUNGE is not allowed if the user does not have write access to
this mailbox.
tag COPY sequence mailbox
The COPY command copies the specified message(s) to the specified
destination mailbox. If the destination mailbox does not exist,
the server should create it. Before returning an OK to the
client, the server should return an unsolicited <n> COPY response
Crispin [Page 13]
RFC 1176 IMAP2 August 1990
for each message copied. A copy should set the \SEEN flag for all
messages that were successfully copied (provided, of course, that
the user has write access to this mailbox).
EXAMPLE: A003 COPY 2:4 MEETING
copies messages 2, 3, and 4 to mailbox "MEETING".
COPY is not allowed if the user does not have write access to the
destination mailbox.
tag FETCH sequence data
The FETCH command retrieves data associated with a message in the
mailbox. The data items to be fetched may be either a single atom
or an S-expression list. The currently defined data items that
can be fetched are:
ALL Macro equivalent to:
(FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)
ENVELOPE The envelope of the message. The envelope is
computed by the server by parsing the RFC 822
header into the component parts, defaulting
various fields as necessary.
FAST Macro equivalent to:
(FLAGS INTERNALDATE RFC822.SIZE)
FLAGS The flags that are set for this message.
This may include the following system flags:
\RECENT Message arrived since the
previous time this mailbox
was read
\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
INTERNALDATE The date and time the message was written to
the mailbox.
Crispin [Page 14]
RFC 1176 IMAP2 August 1990
RFC822 The message in RFC 822 format. The \SEEN
flag is implicitly set; if this causes the
flags to change they should be included as
part of the fetch results. This is the
concatenation of RFC822.HEADER and RFC822.TEXT.
RFC822.HEADER The "raw" RFC 822 format header of the message
as stored on the server.
RFC822.SIZE The number of characters in the message as
expressed in RFC 822 format.
RFC822.TEXT The text body of the message, omitting the
RFC 822 header. The \SEEN flag is implicitly
set as with RFC822 above.
EXAMPLES:
A003 FETCH 2:4 ALL
fetches the flags, internal date, RFC 822 size, and envelope
for messages 2, 3, and 4.
A004 FETCH 3 RFC822
fetches the RFC 822 representation for message 3.
A005 FETCH 4 (FLAGS RFC822.HEADER)
fetches the flags and RFC 822 format header for message 4.
Note: An attempt to FETCH already-transmitted data may have no
result. See the Implementation Discussion below.
tag STORE sequence data value
The STORE command alters data associated with a message in the
mailbox. The currently defined data items that can be stored are:
FLAGS Replace the flags for the message with the
argument (in flag list format).
+FLAGS Add the flags in the argument to the
message's flag list.
-FLAGS Remove the flags in the argument from the
message's flag list.
STORE is not allowed if the user does not have write access to
this mailbox.
Crispin [Page 15]
RFC 1176 IMAP2 August 1990
EXAMPLE: A003 STORE 2:4 +FLAGS (\DELETED)
marks messages 2, 3, and 4 for deletion.
tag SEARCH search_criteria
The SEARCH command searches the mailbox for messages that match
the given set of criteria. The unsolicited SEARCH <1#number>
response from the server is a list of messages that express the
intersection (AND function) of all the messages which match that
criteria. For example,
A003 SEARCH DELETED FROM "SMITH" SINCE 1-OCT-87
returns the message numbers for all deleted messages from Smith
that were placed in the mail file since October 1, 1987.
In all search criteria which use strings, a message matches the
criteria if the string is a case-independent substring of that
field. The currently defined criteria are:
ALL All messages in the mailbox; the default
initial criterion for ANDing.
ANSWERED Messages with the \ANSWERED flag set.
BCC string Messages which contain the specified string
in the envelope's BCC field.
BEFORE date Messages whose internal date is earlier than
the specified date.
BODY string Messages which contain the specified string
in the body of the message.
CC string Messages which contain the specified string
in the envelope's CC field.
DELETED Messages with the \DELETED flag set.
FLAGGED Messages with the \FLAGGED flag set.
FROM string Messages which contain the specified string
in the envelope's FROM field.
KEYWORD flag Messages with the specified flag set.
NEW Messages which have the \RECENT flag set but
not the \SEEN flag. This is functionally
equivalent to "RECENT UNSEEN".
Crispin [Page 16]
RFC 1176 IMAP2 August 1990
OLD Messages which do not have the \RECENT flag
set.
ON date Messages whose internal date is the same as
the specified date.
RECENT Messages which have the \RECENT flag set.
SEEN Messages which have the \SEEN flag set.
SINCE date Messages whose internal date is later than
the specified date.
SUBJECT string Messages which contain the specified string
in the envelope's SUBJECT field.
TEXT string Messages which contain the specified string.
TO string Messages which contain the specified string in
the envelope's TO field.
UNANSWERED Messages which do not have the \ANSWERED flag
set.
UNDELETED Messages which do not have the \DELETED flag
set.
UNFLAGGED Messages which do not have the \FLAGGED flag
set.
UNKEYWORD flag Messages which do not have the specified flag
set.
UNSEEN Messages which do not have the \SEEN flag set.
Crispin [Page 17]
RFC 1176 IMAP2 August 1990
Responses
tag OK text
This response identifies successful completion of the command with
that tag. The text is a line of human-readable text that may be
useful in a protocol telemetry log for debugging purposes.
tag NO text
This response identifies unsuccessful completion of the command
with that tag. The text is a line of human-readable text that
probably should be displayed to the user in an error report by the
client.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?