⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pop.txt

📁 早期freebsd实现
💻 TXT
📖 第 1 页 / 共 2 页
字号:
	      If the number associated with this message is higher than	      the "highest number accessed" in the maildrop, the POP	      server updates the "highest number accessed" to the number	      associated with this message.	    Possible Responses:		+OK message deleted		-ERR no such message	    Examples:		C:    DELE 1		S:    +OK message 1 deleted		  ...		C:    DELE 2		S:    -ERR message 2 already deleted	NOOP	    Arguments: none	    Restrictions: may only be given in the TRANSACTION state.	    Discussion:	      The POP server does nothing, it merely replies with a	      positive response.	    Possible Responses:		+OK	    Examples:		C:    NOOP		S:    +OK        LAST            Arguments: none            Restrictions: may only be issued in the TRANSACTION state.            Discussion:	      The POP server issues a positive response with a line               containing the highest message number which accessed.                Zero is returned in case no message in the maildrop has              been accessed during previous transactions. A client	      may thereafter infer that messages, if any, numbered greater               than the response to the LAST command are messages not yet              accessed by the client.          Possible Response:        	+OK nn          Examples:	        C:     	STAT                S:	+OK 4 320        	C:	LAST	        S:	+OK 1	        C:	RETR 3        	S:	+OK 120 octets	        S:	<the POP server sends the entire message here>        	S:	.	        C:	LAST        	S:	+OK 3	        C:	DELE 2	        S:	+OK message 2 deleted        	C:	LAST	        S:	+OK 3        	C:	RSET        	S:	+OK        	C:	LAST	        S:	+OK 1	RSET	    Arguments: none	    Restrictions: may only be given in the TRANSACTION state.	    Discussion:	      If any messages have been marked as deleted by the POP	      server, they are unmarked.  The POP server then replies	      with a positive response.  In addition, the "highest	      number accessed" is also reset to the value determined	      at the beginning of the POP session.	    Possible Responses:		+OK	    Examples:		C:    RSET		S:    +OK maildrop has 2 messages (320 octets)			   The UPDATE State    When the client issues the QUIT command from the TRANSACTION state    the POP session enters the UPDATE state.  (Note that if the client    issues the QUIT command from the AUTHORIZATION state, the POP    session terminates but does NOT enter the UPDATE state).	QUIT	    Arguments: none	    Restrictions: none	    Discussion:	      The POP server removes all messages marked as deleted	      from the maildrop.  It then releases the exclusive-access	      lock on the maildrop and replies as to the success of	      these operations.  The TCP connection is then closed.	    Possible Responses:		+OK	    Examples:		C:    QUIT		S:    +OK dewey POP server signing off (maildrop empty)		  ...		C:    QUIT		S:    +OK dewey POP server signing off (2 messages left)		  ...			 Optional POP Commands    The POP commands discussed above must be supported by all minimal    implementations of POP servers.    The optional POP commands described below permit a POP client    greater freedom in message handling, while preserving a simple POP    server implementation.	      NOTE: This memo STRONGLY encourages implementations to	      support these commands in lieu of developing augmented	      drop and scan listings.  In short, the philosophy of this	      memo is to put intelligence in the part of the POP client	      and not the POP server.	TOP msg n	    Arguments: a message-id (required) and a number.  This	        message-id may NOT refer to a message marked as deleted.	    Restrictions: may only be given in the TRANSACTION state.	    Discussion:	      If the POP server issues a positive response, then the	      response given is multi-line.  After the initial +OK, the	      POP server sends the headers of the message, the blank	      line separating the headers from the body, and then the	      number of lines indicated message's body, being careful to	      bit-stuff the termination character (as with all	      multi-line responses).  	      Note that if the number of lines requested by the POP	      client is greater than than the number of lines in the	      body, then the POP server sends the entire message.	    Possible Responses:		+OK top of message follows		-ERR no such message	    Examples:		C:    TOP 10		S:    +OK		S:    <the POP server sends the headers of the message,		       a blank line, and the first 10 lines of the		       body of the message>		S:    .		  ...		C:    TOP 100		S:    -ERR no such message	RPOP user	    Arguments: a client specific user-id (required)	    Restrictions: may only be given in the AUTHORIZATION state		after a successful USER command; in addition, may		only be given if the client used a reserved (privileged)		TCP port to connect to the server.	    Discussion:	      The RPOP command may be used instead of the PASS command	      to authenticate access to the maildrop.  In order for this	      command to be successful, the POP client must use a	      reserved TCP port (port < 1024) to connect to the server.	      The POP server uses the argument pair from the USER and	      RPOP commands to determine if the client should be given	      access to the appropriate maildrop.  Unlike the PASS	      command however, the POP server considers if the remote	      user specified by the RPOP command who resides on the POP	      client host is allowed to access the maildrop for the user	      specified by the USER command (e.g., on Berkeley UNIX, the	      .rhosts mechanism is used).  With the exception of this	      differing in authentication, this command is identical to	      the PASS command.  	    Possible Responses:		+OK maildrop locked and ready		-ERR permission denied	    Examples:		C:    USER mrose		S:    +OK mrose is a real hoopy frood		C:    RPOP mrose		S:    +OK mrose's maildrop has 2 messages (320 octets)		       POP Command/Reply Summary    Minimal POP Commands:	USER name		valid in the AUTHORIZATION state	PASS string	QUIT	STAT			valid in the TRANSACTION state	LIST [msg]	RETR msg	DELE msg	NOOP	LAST	RSET	QUIT			valid in the UPDATE state    Optional POP Commands:	RPOP user		valid in the AUTHORIZATION state	TOP msg n		valid in the TRANSACTION state    POP Replies:	+OK	-ERR    Note that with the exception of the STAT command, the reply given    by the POP server to any command is significant only to "+OK" and    "-ERR".  Any text occurring after this reply may be ignored by the    client.			  Example POP Session    S: <wait for connection on TCP port 109>	...    C: <open connection>    S:    +OK dewey POP server ready (Comments to: PostMaster@UDel)    C:    USER mrose    S:	  +OK mrose is a real hoopy frood    C:    PASS secret    S:    +OK mrose's maildrop has 2 messages (320 octets)    C:    STAT    S:	  +OK 2 320    C:	  LIST    S:    +OK 2 messages (320 octets)    S:    1 120    S:    2 200    S:    .    C:    RETR 1    S:    +OK 120 octets    S:    <the POP server sends message 1>    S:	  .    C:    DELE 1    S:    +OK message 1 deleted    C:    RETR 2    S:    +OK 200 octets    S:    <the POP server sends message 2>    S:	  .    C:    DELE 2    S:    +OK message 2 deleted    C:    QUIT    S:    +OK dewey POP server signing off (maildrop empty)    C:  <close connection>    S:  <wait for next connection>			    Message Format    All messages transmitted during a POP session are assumed to    conform to the standard for the format of ARPA Internet text    messages [RFC822].    It is important to note that the byte count for a message on the    server host may differ from the octet count assigned to that    message due to local conventions for designating end-of-line.    Usually, during the AUTHORIZATION state of the POP session, the POP    client can calculate the size of each message in octets when it    parses the maildrop into messages.  For example, if the POP server    host internally represents end-of-line as a single character, then    the POP server simply counts each occurrence of this character in a    message as two octets.  Note that lines in the message which start    with the termination octet need not be counted twice, since the POP    client will remove all bit-stuffed termination characters when it    receives a multi-line response.		    The POP and the Split-UA model    The underlying paradigm in which the POP functions is that of a    split-UA model.  The POP client host, being a remote PC based    workstation, acts solely as a client to the message transport    system.  It does not provide delivery/authentication services to    others.  Hence, it is acting as a UA, on behalf of the person using    the workstation.  Furthermore, the workstation uses SMTP to enter    mail into the MTS.     In this sense we have two UA functions which interface to the    message transport system: Posting (SMTP) and Retrieval (POP). The    entity which supports this type of environment is called a split-UA    (since the user agent is split between two hosts which must    interoperate to provide these functions).  	      ASIDE: Others might term this a remote-UA instead.  There	      are arguments supporting the use of both terms.    This memo has explicitly referenced TCP as the underlying transport    agent for the POP.  This need not be the case.  In the MZnet    split-UA, for example, personal micro-computer systems are used    which do not have IP-style networking capability.  To connect to    the POP server host, a PC establishes a terminal connection using    some simple protocol (PhoneNet).  A program on the PC drives the    connection, first establishing a login session as a normal user.    The login shell for this pseudo-user is a program which drives the    other half of the terminal protocol and communicates with one of    two servers. Although MZnet can support several PCs, a single    pseudo-user login is present on the server host.  The user-id and    password for this pseudo-user login is known to all members of    MZnet. Hence, the first action of the login shell, after starting    the terminal protocol, is to demand a USER/PASS authorization pair    from the PC.  This second level of authorization is used to    ascertain who is interacting with the MTS. Although the server host    is deemed to support a "trusted" MTS entity, PCs in MZnet are not.    Naturally, the USER/PASS authorization pair for a PC is known only    to the owner of the PC (in theory, at least).    After successfully verifying the identity of the client, a modified    SMTP server is started, and the PC posts mail with the server host.    After the QUIT command is given to the SMTP server and it    terminates, a modified POP server is started, and the PC retrieves    mail from the server host. After the QUIT command is given to the    POP server and it terminates, the login shell for the pseudo-user    terminates the terminal protocol and logs the job out.  The PC then    closes the terminal connection to the server host.    The SMTP server used by MZnet is modified in the sense that it    knows that it's talking to a user agent and not a "trusted" entity    in the message transport system.  Hence, it does performs the    validation activities normally performed by an entity in the MTS    when it accepts a message from a UA.    The POP server used by MZnet is modified in the sense that it does    not require a USER/PASS combination before entering the TRANSACTION    state.  The reason for this (of course) is that the PC has already    identified itself during the second-level authorization step    described above.	      NOTE: Truth in advertising laws require that the author	      of this memo state that MZnet has not actually been fully	      implemented.  The concepts presented and proven by the	      project led to the notion of the MZnet split-slot model.	      This notion has inspired the split-UA concept described	      in this memo, led to the author's interest in the POP,	      and heavily influenced the the description of the POP	      herein.    In fact, some UAs present in the ARPA Internet already support the    notion of posting directly to an SMTP server and retreiving mail    directly from a POP server, even if the POP server and client    resided on the same host!  	      ASIDE: this discussion raises an issue which this memo	      purposedly avoids: how does SMTP know that it's talking	      to a "trusted" MTS entity?			      References    [MZnet]	E.A. Stefferud, J.N. Sweet, T.P. Domae.		"MZnet: Mail Service for Personal Micro-Computer		Systems",  Proceedings, IFIP 6.5 International		Conference on Computer Message Systems, Nottingham, U.K.		(May, 1984)    [RFC821]	J.B. Postel.		"Simple Mail Transfer Protocol", USC/Information Sciences		Institute. (August, 1982)    [RFC822]	D.H. Crocker.		"Standard for the Format of ARPA Internet Text		Messages", University of Delaware.  (August, 1982)    [RFC918]    J.K. Reynolds.		"Post Office Protocol", USC/Information Sciences Institute.		(October, 1984)    [RFC923]    J.K. Reynolds, J.B. Postel.		"Assigned Numbers", USC/Information Sciences Institute.		(October, 1984)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -