protocols:hf-pop
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| protocols:hf-pop [2018/08/20 12:22] – [The APOP command] root | protocols:hf-pop [2018/08/20 12:43] (current) – [The UPDATE State] root | ||
|---|---|---|---|
| Line 214: | Line 214: | ||
| Here are the POP3 commands valid in the TRANSACTION state: | Here are the POP3 commands valid in the TRANSACTION state: | ||
| + | ==== The LIST Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| LIST [msg] | LIST [msg] | ||
| | | ||
| - | Arguments: | + | __Arguments:__ |
| - | a message-number (optional), which, if present, may NOT | + | a message-number (optional), which, if present, may NOT |
| - | refer to a message marked as deleted | + | refer to a message marked as deleted |
| - | + | ||
| - | | + | __Restrictions:__ |
| - | may only be given in the TRANSACTION state | + | may only be given in the TRANSACTION state |
| - | Discussion: | + | __Discussion:__ |
| - | If an argument was given and the POP3 server issues a positive response with a line | + | If an argument was given and the POP3 server issues a positive response with a line |
| - | containing information for that message. This line is called a "scan listing" | + | containing information for that message. This line is called a "scan listing" |
| - | message. | + | message. |
| If no argument was given and the POP3 server issues a positive response, then the response | If no argument was given and the POP3 server issues a positive response, then the response | ||
| Line 243: | Line 246: | ||
| Note that messages marked as deleted are not listed. | Note that messages marked as deleted are not listed. | ||
| - | Possible | + | __Possible |
| +OK scan listing follows | +OK scan listing follows | ||
| -ERR no such message | -ERR no such message | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: LIST | C: LIST | ||
| S: +OK 2 messages (320 octets) | S: +OK 2 messages (320 octets) | ||
| Line 260: | Line 263: | ||
| S: -ERR no such message, only 2 messages in maildrop | S: -ERR no such message, only 2 messages in maildrop | ||
| + | ==== The RETR Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| RETR nn | RETR nn | ||
| - | | + | |
| - | | + | __Arguments:__ |
| - | a message-number (optional) which may NOT refer to a message marked as deleted | + | a message-number (optional) which may NOT refer to a message marked as deleted |
| - | + | ||
| - | | + | __Restrictions:__ |
| - | may only be given in the TRANSACTION state | + | may only be given in the TRANSACTION state |
| - | + | ||
| - | | + | __Discussion:__ |
| - | If the POP3 server issues a positive response, then the response given is multi-line. If | + | If the POP3 server issues a positive response, then the response given is multi-line. If |
| - | an argument was given, after the initial +OK, the POP3 server sends the message | + | an argument was given, after the initial +OK, the POP3 server sends the message |
| - | corresponding to the given message-number, | + | corresponding to the given message-number, |
| - | termination character (as with all multi-line responses). If no argument was given, | + | termination character (as with all multi-line responses). If no argument was given, |
| - | the server sends all messages in the drop which are not marked as deleted. Use UIDL | + | the server sends all messages in the drop which are not marked as deleted. Use UIDL |
| - | to identify boundary between messages? If so, need to include the UIDL response as | + | to identify boundary between messages? If so, need to include the UIDL response as |
| - | part of the response to APOP. | + | part of the response to APOP. |
| - | + | ||
| - | | + | __Possible |
| +OK message nn follows | +OK message nn follows | ||
| +OK m messages follow | +OK m messages follow | ||
| -ERR no such message | -ERR no such message | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: RETR 1 | C: RETR 1 | ||
| S: +OK 120 octets | S: +OK 120 octets | ||
| Line 288: | Line 294: | ||
| S: . | S: . | ||
| + | ==== The DELE Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| DELE msg | DELE msg | ||
| - | | + | |
| - | | + | __Arguments:__ |
| - | a message-number (required) which may NOT refer to a message marked as deleted | + | a message-number (required) which may NOT refer to a message marked as deleted |
| - | Restrictions: | + | Restrictions: |
| - | may only be given in the TRANSACTION state | + | may only be given in the TRANSACTION state |
| - | + | ||
| - | | + | __Discussion:__ |
| - | The POP3 server marks the message as deleted. Any future reference to the | + | The POP3 server marks the message as deleted. Any future reference to the |
| - | message-number associated with the message in a POP3 command generates an | + | message-number associated with the message in a POP3 command generates an |
| - | error. The POP3 server does not actually delete the message until the POP3 session | + | error. The POP3 server does not actually delete the message until the POP3 session |
| - | enters the UPDATE state. | + | enters the UPDATE state. |
| - | + | ||
| - | | + | __Possible |
| +OK message deleted | +OK message deleted | ||
| -ERR no such message | -ERR no such message | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: DELE 1 | C: DELE 1 | ||
| S: +OK message 1 deleted | S: +OK message 1 deleted | ||
| Line 312: | Line 321: | ||
| S: -ERR message 2 already deleted | S: -ERR message 2 already deleted | ||
| + | ==== The RSET Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| RSET | RSET | ||
| - | Arguments: none | + | |
| + | __Arguments:__ none | ||
| | | ||
| - | Restrictions: | + | __Restrictions:__ |
| - | may only be given in the TRANSACTION state | + | may only be given in the TRANSACTION state |
| | | ||
| - | Discussion: | + | __Discussion:__ |
| - | If any messages have been marked as deleted by the POP3 server, they are unmarked. | + | If any messages have been marked as deleted by the POP3 server, they are unmarked. |
| - | The POP3 server then replies with a positive response. | + | The POP3 server then replies with a positive response. |
| | | ||
| - | Possible | + | __Possible |
| +OK | +OK | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: RSET | C: RSET | ||
| S: +OK maildrop has 2 messages (320 octets) | S: +OK maildrop has 2 messages (320 octets) | ||
| + | ==== The STAT Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| STAT | STAT | ||
| | | ||
| - | Arguments: none | + | __Arguments:__ none |
| | | ||
| - | Restrictions: | + | __Restrictions:__ |
| may only be given in the TRANSACTION state | may only be given in the TRANSACTION state | ||
| | | ||
| - | Discussion: | + | __Discussion:__ |
| - | The POP3 server issues a positive response with a line containing information for the | + | The POP3 server issues a positive response with a line containing information for the |
| - | maildrop. This line is called a "drop listing" | + | maildrop. This line is called a "drop listing" |
| In order to simplify parsing, all POP3 servers are required to use a certain format for drop | In order to simplify parsing, all POP3 servers are required to use a certain format for drop | ||
| Line 347: | Line 363: | ||
| Note that messages marked as deleted are not counted in either total. | Note that messages marked as deleted are not counted in either total. | ||
| - | Possible | + | __Possible |
| +OK nn mm | +OK nn mm | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: STAT | C: STAT | ||
| S: +OK 2 320 | S: +OK 2 320 | ||
| - | | + | ==== The UIDL Command |
| + | |||
| + | __Usage: | ||
| + | UIDL [msg] | ||
| | | ||
| - | Arguments: | + | __Arguments:__ |
| - | a message-number (optional), which, if present, may NOT refer to a message marked | + | a message-number (optional), which, if present, may NOT refer to a message marked |
| - | as deleted | + | as deleted |
| | | ||
| - | Restrictions: | + | __Restrictions:__ |
| - | may only be given in the TRANSACTION state. | + | may only be given in the TRANSACTION state. |
| | | ||
| - | Discussion: | + | __Discussion:__ |
| - | If an argument was given and the POP3 server issues a positive response with a line | + | If an argument was given and the POP3 server issues a positive response with a line |
| - | containing information for that message. This line is called a " | + | containing information for that message. This line is called a " |
| - | that message. | + | that message. |
| | | ||
| - | | + | If no argument was given, then the response given is multi-line. After the initial |
| - | +OK, for each message in the maildrop, the HF-POP3 server responds with a line | + | +OK, for each message in the maildrop, the HF-POP3 server responds with a line |
| - | containing information for that message. This line is called a " | + | containing information for that message. This line is called a " |
| - | that message. | + | that message. |
| | | ||
| - | | + | In order to simplify parsing, all POP3 servers are required to use a certain format for |
| - | unique-id listings. A unique-id listing consists of the message-number of the | + | unique-id listings. A unique-id listing consists of the message-number of the |
| - | message, followed by a single space and the unique-id of the message. No | + | message, followed by a single space and the unique-id of the message. No |
| - | information follows the unique-id in the unique-id listing. | + | information follows the unique-id in the unique-id listing. |
| | | ||
| - | | + | The unique-id of a message is an arbitrary server-determined string, consisting of one |
| - | to 70 characters in the range 0x21 to 0x7E, which uniquely identifies a message | + | to 70 characters in the range 0x21 to 0x7E, which uniquely identifies a message |
| - | within a maildrop and which persists across sessions. This persistence is required | + | within a maildrop and which persists across sessions. This persistence is required |
| - | even if a session ends without entering the UPDATE state. The server should never | + | even if a session ends without entering the UPDATE state. The server should never |
| - | reuse an unique-id in a given maildrop, for as long as the entity using the unique-id | + | reuse an unique-id in a given maildrop, for as long as the entity using the unique-id |
| - | exists. | + | exists. |
| | | ||
| - | | + | Note that messages marked as deleted are not listed. |
| | | ||
| - | | + | While it is generally preferable for server implementations to store arbitrarily |
| - | assigned unique-ids in the maildrop, this specification is intended to permit uniqueids | + | assigned unique-ids in the maildrop, this specification is intended to permit uniqueids |
| - | to be calculated as a hash of the message. Clients should be able to handle a | + | to be calculated as a hash of the message. Clients should be able to handle a |
| - | situation where two identical copies of a message in a maildrop have the same | + | situation where two identical copies of a message in a maildrop have the same |
| - | unique-id. | + | unique-id. |
| | | ||
| - | Possible | + | __Possible |
| +OK unique-id listing follows | +OK unique-id listing follows | ||
| -ERR no such message | -ERR no such message | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: UIDL | C: UIDL | ||
| S: +OK | S: +OK | ||
| Line 421: | Line 440: | ||
| maildrop. | maildrop. | ||
| + | ==== The QUIT Command ==== | ||
| + | |||
| + | __Usage:__ | ||
| QUIT | QUIT | ||
| | | ||
| - | Arguments: none | + | __Arguments:__ none |
| | | ||
| - | Restrictions: none | + | __Restrictions:__ none |
| | | ||
| - | Discussion: | + | __Discussion:__ |
| - | The POP3 server removes all messages marked as deleted from the maildrop and | + | The POP3 server removes all messages marked as deleted from the maildrop and |
| - | replies as to the status of this operation. If there is an error, such as a resource | + | replies as to the status of this operation. If there is an error, such as a resource |
| - | shortage, encountered while removing messages, the maildrop may result in having | + | shortage, encountered while removing messages, the maildrop may result in having |
| - | some or none of the messages marked as deleted be removed. In no case may the | + | some or none of the messages marked as deleted be removed. In no case may the |
| - | server remove any messages not marked as deleted. | + | server remove any messages not marked as deleted. |
| - | + | ||
| - | Whether the removal was successful or not, the server then releases any exclusiveaccess | + | Whether the removal was successful or not, the server then releases any exclusiveaccess |
| - | lock on the maildrop and closes the connection | + | lock on the maildrop and closes the connection |
| - | + | ||
| - | | + | __Possible |
| +OK | +OK | ||
| -ERR some deleted messages not removed | -ERR some deleted messages not removed | ||
| - | | + | |
| - | | + | __Examples:__ |
| C: QUIT | C: QUIT | ||
| S: +OK dewey POP3 server signing off (maildrop empty) | S: +OK dewey POP3 server signing off (maildrop empty) | ||
| Line 448: | Line 470: | ||
| S: +OK dewey POP3 server signing off (2 messages left) | S: +OK dewey POP3 server signing off (2 messages left) | ||
| ... | ... | ||
| + | | ||
| + | ==== The TOP Command ==== | ||
| + | __Usage:__ | ||
| TOP msg n | TOP msg n | ||
| | | ||
| - | Arguments: | + | __Arguments:__ |
| - | a message-number (required) which may NOT refer to to a message marked as | + | a message-number (required) which may NOT refer to to a message marked as |
| - | deleted, and a non-negative number of lines (required) | + | deleted, and a non-negative number of lines (required) |
| | | ||
| - | Restrictions: | + | __Restrictions:__ |
| - | may only be given in the TRANSACTION state | + | may only be given in the TRANSACTION state |
| | | ||
| - | Discussion: | + | __Discussion:__ |
| - | If the POP3 server issues a positive response, then the response given is multi-line. | + | If the POP3 server issues a positive response, then the response given is multi-line. |
| - | After the initial +OK, the POP3 server sends the headers of the message, the blank | + | After the initial +OK, the POP3 server sends the headers of the message, the blank |
| - | line separating the headers from the body, and then the number of lines of the | + | line separating the headers from the body, and then the number of lines of the |
| - | indicated message' | + | indicated message' |
| - | with all multi-line responses). | + | with all multi-line responses). |
| - | + | ||
| - | Note that if the number of lines requested by the POP3 client is greater than than the | + | Note that if the number of lines requested by the POP3 client is greater than than the |
| - | number of lines in the body, then the POP3 server sends the entire message. | + | number of lines in the body, then the POP3 server sends the entire message. |
| | | ||
| - | Possible | + | __Possible |
| +OK top of message follows | +OK top of message follows | ||
| -ERR no such message | -ERR no such message | ||
| | | ||
| - | Examples: | + | __Examples:__ |
| C: TOP 1 10 | C: TOP 1 10 | ||
| S: +OK | S: +OK | ||
protocols/hf-pop.1534760520.txt.gz · Last modified: 2018/08/20 12:22 by root