User Tools

Site Tools


protocols:hf-pop

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
protocols:hf-pop [2018/08/14 16:19] rootprotocols:hf-pop [2018/08/20 12:43] (current) – [The UPDATE State] root
Line 95: Line 95:
 shall be used for this purpose. shall be used for this purpose.
  
 +==== The APOP command ====
 +
 +__Usage:__
   APOP name digest   APOP name digest
 +
 +__Arguments:__
 +A string identifying a mailbox and a MD5 digest string (both required)
 +
 +__Restrictions:__
 +May only be given in the AUTHORIZATION state after the POP3 greeting or after
 +an unsuccessful USER or PASS command
 +
 +__Discussion:__
      
-  Arguments: +In the context of this standard, the APOP command provides both origin 
-   +authentication and replay protection. An HF-POP3 servers shall include a timestamp 
-  a string identifying a mailbox and a MD5 digest string (both required) +in its banner greeting. The syntax of the timestamp corresponds to the `msg-id' in 
-   +[RFC822], and MUST be different each time the POP3 server issues a banner 
-  Restrictions: +greeting. For example, on a UNIX implementation in which a separate UNIX 
-  may only be given in the AUTHORIZATION state after the POP3 greeting or after +process is used for each instance of a POP3 server, the syntax of the timestamp might 
-  an unsuccessful USER or PASS command +be: 
-   +
-  Discussion: +
-   +
-  In the context of this standard, the APOP command provides both origin +
-  authentication and replay protection. An HF-POP3 servers shall include a timestamp +
-  in its banner greeting. The syntax of the timestamp corresponds to the `msg-id' in +
-  [RFC822], and MUST be different each time the POP3 server issues a banner +
-  greeting. For example, on a UNIX implementation in which a separate UNIX +
-  process is used for each instance of a POP3 server, the syntax of the timestamp might +
-  be: +
-  +
   <process-ID.clock@hostname>   <process-ID.clock@hostname>
-   + 
-  where `process-ID' is the decimal value of the process's PID, clock is the decimal +where `process-ID' is the decimal value of the process's PID, clock is the decimal 
-  value of the system clock, and hostname is the fully-qualified domain-name +value of the system clock, and hostname is the fully-qualified domain-name 
-  corresponding to the host where the POP3 server is running. +corresponding to the host where the POP3 server is running. 
-   + 
-  The POP3 client makes note of this timestamp, and then issues the APOP command. +The POP3 client makes note of this timestamp, and then issues the APOP command. 
-  The `name' parameter has identical semantics to the `name' parameter of the USER +The `name' parameter has identical semantics to the `name' parameter of the USER 
-  command. The `digest' parameter is calculated by applying the MD5 algorithm +command. The `digest' parameter is calculated by applying the MD5 algorithm 
-  [RFC1321] to a string consisting of the timestamp (including angle-brackets) +[RFC1321] to a string consisting of the timestamp (including angle-brackets) 
-  followed by a shared secret. This shared secret is a string known only to the POP3 +followed by a shared secret. This shared secret is a string known only to the POP3 
-  client and server. Great care should be taken to prevent unauthorized disclosure of +client and server. Great care should be taken to prevent unauthorized disclosure of 
-  the secret, as knowledge of the secret will allow any entity to successfully +the secret, as knowledge of the secret will allow any entity to successfully 
-  masquerade as the named user. The `digest' parameter itself is a 16-octet value +masquerade as the named user. The `digest' parameter itself is a 16-octet value 
-  which is sent in hexadecimal format, using lower-case ASCII characters. +which is sent in hexadecimal format, using lower-case ASCII characters. 
-   + 
-  When the POP3 server receives the APOP command, it verifies the digest provided. +When the POP3 server receives the APOP command, it verifies the digest provided. 
-  If the digest is correct, the POP3 session enters the TRANSACTION state and the +If the digest is correct, the POP3 session enters the TRANSACTION state and the 
-  POP3 server issues a positive response including the LIST response for the maildrop, +POP3 server issues a positive response including the LIST response for the maildrop, 
-  as shown below. Otherwise, a negative response is issued and the POP3 session +as shown below. Otherwise, a negative response is issued and the POP3 session 
-  remains in the AUTHORIZATION state.+remains in the AUTHORIZATION state.
  
 Note that as the length of the shared secret increases, so does the difficulty of deriving it. As Note that as the length of the shared secret increases, so does the difficulty of deriving it. As
Line 141: Line 143:
 shown below). shown below).
  
-  Possible Responses:+__Possible Responses:__
   S: +OK maildrop locked and ready; maildrop has 1 message (320 octets)   S: +OK maildrop locked and ready; maildrop has 1 message (320 octets)
   S: 1 120   S: 1 120
Line 148: Line 150:
   S: -ERR permission denied   S: -ERR permission denied
      
-  Examples:+__Examples:__
   S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>   S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
   C: APOP mrose c4c9334bac560ecc979e58001b3e22fb   C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
Line 154: Line 156:
   S: 1 369   S: 1 369
      
-  In this example, the shared secret is the string `tanstaaf'. Hence, the MD5 +In this example, the shared secret is the string ''tanstaaf''. Hence, the MD5 
-  algorithm is applied to the string+algorithm is applied to the string
      
   <1896.697170952@dbc.mtview.ca.us>tanstaaf   <1896.697170952@dbc.mtview.ca.us>tanstaaf
      
-  which produces a digest value of +which produces a digest value of ''c4c9334bac560ecc979e58001b3e22fb''
-   +
-  c4c9334bac560ecc979e58001b3e22fb+
  
 Once the POP3 server has determined through the use of the APOP command that the client Once the POP3 server has determined through the use of the APOP command that the client
Line 184: Line 184:
 message in a maildrop is assigned a message-number of "n". In HF-POP3 commands and message in a maildrop is assigned a message-number of "n". In HF-POP3 commands and
 responses, all message-numbers and message sizes are expressed in base-10 (i.e., decimal). responses, all message-numbers and message sizes are expressed in base-10 (i.e., decimal).
-  + 
 +==== The QUIT command ==== 
 Here is the summary for the QUIT command when used in the AUTHORIZATION state: Here is the summary for the QUIT command when used in the AUTHORIZATION state:
  
   QUIT   QUIT
      
-  Arguments: none+__Arguments:__ none
      
-  Restrictions: none+__Restrictions:__ none
      
-  Possible Responses:+__Possible Responses:__
   +OK   +OK
-   + 
-  Examples:+__Examples:__
   C: QUIT   C: QUIT
   S: +OK dewey POP3 server signing off   S: +OK dewey POP3 server signing off
Line 212: 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+__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" for that +containing information for that message. This line is called a "scan listing" for that 
-  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 241: Line 246:
 Note that messages marked as deleted are not listed. Note that messages marked as deleted are not listed.
  
-  Possible Responses:+__Possible Responses:__
   +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 258: 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+__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+__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 +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, being careful to byte-stuff the +corresponding to the given message-number, being careful to byte-stuff the 
-  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 Responses:+__Possible Responses:__
   +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 286: Line 294:
   S: .   S: .
  
 +==== The DELE Command ====
 +
 +__Usage:__
   DELE msg   DELE msg
-   + 
-  Arguments+__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+__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 Responses:+__Possible Responses:__
   +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 310: 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 Responses:+__Possible Responses:__
   +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" for that maildrop.+maildrop. This line is called a "drop listing" for that maildrop.
  
 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 345: 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 Responses:+__Possible Responses:__
   +OK nn mm   +OK nn mm
      
-  Examples:+__Examples:__
   C: STAT   C: STAT
   S: +OK 2 320   S: +OK 2 320
  
-  UIDL [msg] (OPTIONAL)+==== The UIDL Command (OPTIONAL) ==== 
 + 
 +__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 "unique-id listing" for +containing information for that message. This line is called a "unique-id listing" for 
-  that message.+that message.
      
-  If no argument was given, then the response given is multi-line. After the initial +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 "unique-id listing" for +containing information for that message. This line is called a "unique-id listing" for 
-  that message.+that message.
      
-  In order to simplify parsing, all POP3 servers are required to use a certain format for +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 +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.+Note that messages marked as deleted are not listed.
      
-  While it is generally preferable for server implementations to store arbitrarily +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 Responses:+__Possible Responses:__
   +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 419: 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 Responses:+__Possible Responses:__
   +OK   +OK
   -ERR some deleted messages not removed   -ERR some deleted messages not removed
-   + 
-  Examples:+__Examples:__
   C: QUIT   C: QUIT
   S: +OK dewey POP3 server signing off (maildrop empty)   S: +OK dewey POP3 server signing off (maildrop empty)
Line 446: 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's body, being careful to byte-stuff the termination character (as +indicated message's body, being careful to byte-stuff the termination character (as 
-  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 Responses:+__Possible Responses:__
   +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.1534256369.txt.gz · Last modified: 2018/08/14 16:19 by root

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki