📄 rfc1203.txt
字号:
for those servers which have inactivity autologout timers). tag LOGIN user password The LOGIN command identifies the user to the server and carries the password authenticating this user. This information is used by the server to control access to the mailboxes. EXAMPLE: A001 LOGIN SMITH SESAME logs in as user SMITH with password SESAME. tag LOGOUT The LOGOUT command indicates the client is done with the session. The server sends a solicited BYE response before the (tagged) OK response, and then closes the connection. tag SELECT mailbox The SELECT command selects a particular mailbox. The server must check that the user is permitted read access to this mailbox. Prior to returning an OK to the client, the server must send an solicited FLAGS and <n> EXISTS response to the client giving the flags list for this mailbox (simply the system flags if this mailbox doesn't have any special flags) and the number of messages in the mailbox. It is also recommended that the server send a <n> RECENT unsolicited response to the client for the benefit of clients which make use of the number of new messages in a mailbox. It is further recommended that servers should send an unsolicited READONLY message if the mailbox that has been selected is notRice [Page 16]RFC 1203 IMAP3 February 1991 writable by the user. Multiple SELECT commands are permitted in a session, in which case the prior mailbox is deselected first. The default mailbox for the SELECT command is INBOX, which is a special name reserved to mean "the primary mailbox for this user on this server". The format of other mailbox names is operating system dependent (as of this writing, it reflects the path of the mailbox on the current servers), though it could reflect any server-specific naming convention for the namespace of mailboxes. Such a namespace need not and should not be viewed as being equivalent or linked to the server machine's file system. EXAMPLES: A002 SELECT INBOX ;; selects the default mailbox. A002 197 EXISTS ;; server says 197 messages in INBOX A002 5 RECENT ;; server says 5 are recent. A002 OK Select complete. or A003 SELECT /usr/fred/my-mail.txt ;; select a different user specified mailbox. ... tag CHECK The CHECK command forces a check for new messages and a rescan of the mailbox for internal change for those implementations which allow multiple simultaneous read/write access to the same mailbox (e.g., TOPS-20). It is recommend that periodic implicit checks for new mail be done by servers as well. The server must send a solicited <n> EXISTS response prior to 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. Prior to returning an OK to the client, for each message which is removed, a solicited <n> EXPUNGE response is sent indicating which message was removed. The message number of each subsequent message in the mailbox is immediately decremented by 1; this means that if the last 5 messages in a 9-message mailbox are expunged you will receive 5 "5 EXPUNGE" responses for message 5. To ensure mailbox integrity and server/client synchronization, it is recommended that the server do an implicit check prior to commencing the expunge and again when the expunge is completed. Furthermore, if the server allows multiple simultaneous access to the same mailbox the server must guarantee both the integrity of the mailbox andRice [Page 17]RFC 1203 IMAP3 February 1991 the views of it held by the clients. EXPUNGE is not allowed if the user does not have write access to this mailbox. If a user does not have write access to the mailbox then the server is required to signal this fact by replying with a NO response with a suitable text string that can be presented to the user explaining that the mailbox is read-only. It is further recommended that servers send an unsolicited READONLY message to clients that attempt an expunge operation on a read only 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. Prior to returning an OK to the client, the server must return a solicited <n> COPY response for each message copied. 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. If a user does not have write access to the destination mailbox then the server is required to signal this fact by replying with a NO response with a suitable text string that can be presented to the user explaining that the mailbox is read-only. It is further recommended that servers send an unsolicited READONLY message to clients that attempt to copy to a read only mailbox. IMAP3 does not specify "where" the message will be put in the mailbox to which it has been copied. tag FETCH sequence fetch_att 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 attributes that can be fetched are any of those mentioned specifically below along with any generic, canonical or concrete key. The set of predefined generic keys is: {BCC, BODY, CC, FROM, HEADER, SIZE, SUBJECT, TEXT, TO}. The set of predefined canonical keys is {$CC, $FROM, $SUBJECT, $TO}. The value returned by the server for a non-existent or non-meaningful key is defined to be the null value, NIL. ALL Equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) ENVELOPE The envelope of the message. The envelope is computed by the server by parsing the header,Rice [Page 18]RFC 1203 IMAP3 February 1991 i.e., the RFC 822 header for an RFC822 format message, into the component parts, defaulting various fields as necessary. FAST Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE) FLAGS The flags which are set for this message. This may include the following system flags: \RECENT Message arrived since last read of this mailbox \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. RFC822 The message in RFC 822 format. RFC822.HEADER The RFC 822 format header of the message. 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. 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. A006 FETCH 42 $SUBJECT A006 FETCH $SUBJECT "Some subject text..." A006 OK FETCH completed ok. fetches the canonical subject field.Rice [Page 19]RFC 1203 IMAP3 February 1991 A007 FETCH 42 APPARENTLY-TO A007 FETCH APPARENTLY-TO NIL A007 OK FETCH found no value. fetches the concrete apparently-to field. tag STORE sequence data value The STORE command alters the values associated with particular keys for a message in the mailbox. As is the case for the FETCH command, any generic, canonical or concrete key may be used to index the value provided. In addition to these, the following pre-defined keys are provided. FLAGS Replace the flags for the message with the argument (in flag list format). The server must respond with a solicited STORE FLAGS message, showing the new state of the flags after the store. +FLAGS Add the flags in the argument to the message's flag list. The server must respond with a solicited STORE FLAGS message, showing the new state of the flags after the store. -FLAGS Remove the flags in the argument from the message's flag list. The server must respond with a solicited STORE FLAGS message, showing the new state of the flags after the store. RFC822.HEADER Replace the header of the message(s) with that specified. This allows users to use their mailboxes as databases with header fields as keys. The server must respond with solicited STORE RFC822.HEADER, STORE RFC822.SIZE and STORE ENVELOPE messages, showing the new state of the reparsed header after the store. RFC822.TEXT Replace the body of the messages with that specified. The server must respond with solicited STORE RFC822.TEXT and STORE RFC822.SIZE messages, showing the new state of the message after the store. STORE is not allowed if the user does not have write access to this mailbox. The server is required to send a solicited STORE response forRice [Page 20]RFC 1203 IMAP3 February 1991 each store operation that results in a format transformation by the server. For example, the server is required to send a STORE FLAGS response when the client performs a STORE +FLAGS or a STORE -FLAGS, since the client may not easily be able to know what the result of this command will be. Similarly, if the client emits a STORE FROM command then the server should respond with a suitable STORE FROM response because the client would be sending a string value to be stored and the server should transform this into a set of addresses. In general, however, although it is legal for the server to send a solicited STORE response for each STORE operation, this is discouraged, since it might result in the retransmission of very large and unnecessary amounts of data that have been stored. 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 which match the given set of criteria. The server response SEARCH (criteria) (numbers) gives the set of messages which match the conjunction of the criteria specified. In addition to each of the search criteria there is its logical inverse. The logical inverse criterion is denoted by the ~ (tilda) sign.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -