[ { "section_number": "1.", "section_name": "Introduction", "tag": "Section 1. Introduction", "content": "On certain types of smaller nodes in the Internet it is often\n impractical to maintain a message transport system (MTS). For\n example, a workstation may not have sufficient resources (cycles,\n disk space) in order to permit a SMTP server [RFC821] and associated\n local mail delivery system to be kept resident and continuously\n running. Similarly, it may be expensive (or impossible) to keep a\n personal computer interconnected to an IP-style network for long\n amounts of time (the node is lacking the resource known as\n \"connectivity\").\n Despite this, it is often very useful to be able to manage mail on\n these smaller nodes, and they often support a user agent (UA) to aid\n the tasks of mail handling. To solve this problem, a node which can\n support an MTS entity offers a maildrop service to these less endowed\n nodes. The Post Office Protocol - Version 3 (POP3) is intended to\n permit a workstation to dynamically access a maildrop on a server\n host in a useful fashion. Usually, this means that the POP3 protocol\n is used to allow a workstation to retrieve mail that the server is\n holding for it.\n POP3 is not intended to provide extensive manipulation operations of\n mail on the server; normally, mail is downloaded and then deleted. A\n more advanced (and complex) protocol, IMAP4, is discussed in\n [RFC1730].\n For the remainder of this memo, the term \"client host\" refers to a\n host making use of the POP3 service, while the term \"server host\"\n refers to a host which offers the POP3 service." }, { "section_number": "2.", "section_name": "A Short Digression", "tag": "Section 2. A Short Digression", "content": "This memo does not specify how a client host enters mail into the\n transport system, although a method consistent with the philosophy of\n this memo is presented here:\n When the user agent on a client host wishes to enter a message\n into the transport system, it establishes an SMTP connection to\n its relay host and sends all mail to it. This relay host could\n be, but need not be, the POP3 server host for the client host. Of\n course, the relay host must accept mail for delivery to arbitrary\n recipient addresses, that functionality is not required of all\n SMTP servers." }, { "section_number": "3.", "section_name": "Basic Operation", "tag": "Section 3. Basic Operation", "content": "Initially, the server host starts the POP3 service by listening on\n TCP port 110. When a client host wishes to make use of the service,\n it establishes a TCP connection with the server host. When the\n connection is established, the POP3 server sends a greeting. The\n client and POP3 server then exchange commands and responses\n (respectively) until the connection is closed or aborted.\n Commands in the POP3 consist of a case-insensitive keyword, possibly\n followed by one or more arguments. All commands are terminated by a\n CRLF pair. Keywords and arguments consist of printable ASCII\n characters. Keywords and arguments are each separated by a single\n SPACE character. Keywords are three or four characters long. Each\n argument may be up to 40 characters long.\n Responses in the POP3 consist of a status indicator and a keyword\n possibly followed by additional information. All responses are\n terminated by a CRLF pair. Responses may be up to 512 characters\n long, including the terminating CRLF. There are currently two status\n indicators: positive (\"+OK\") and negative (\"-ERR\"). Servers MUST\n send the \"+OK\" and \"-ERR\" in upper case.\n Responses to certain commands are multi-line. In these cases, which\n are clearly indicated below, after sending the first line of the\n response and a CRLF, any additional lines are sent, each terminated\n by a CRLF pair. When all lines of the response have been sent, a\n final line is sent, consisting of a termination octet (decimal code\n 046, \".\") and a CRLF pair. If any line of the multi-line response\n begins with the termination octet, the line is \"byte-stuffed\" by\n pre-pending the termination octet to that line of the response.\n Hence a multi-line response is terminated with the five octets\n \"CRLF.CRLF\". When examining a multi-line response, the client checks\n to see if the line begins with the termination octet. If so and if\n octets other than CRLF follow, the first octet of the line (the\n termination octet) is stripped away. If so and if CRLF immediately\n follows the termination character, then the response from the POP\n server is ended and the line containing \".CRLF\" is not considered\n part of the multi-line response.\n A POP3 session progresses through a number of states during its\n lifetime. Once the TCP connection has been opened and the POP3\n server has sent the greeting, the session enters the AUTHORIZATION\n state. In this state, the client must identify itself to the POP3\n server. Once the client has successfully done this, the server\n acquires resources associated with the client's maildrop, and the\n session enters the TRANSACTION state. In this state, the client\n requests actions on the part of the POP3 server. When the client has\n issued the QUIT command, the session enters the UPDATE state. In\n this state, the POP3 server releases any resources acquired during\n the TRANSACTION state and says goodbye. The TCP connection is then\n closed.\n A server MUST respond to an unrecognized, unimplemented, or\n syntactically invalid command by responding with a negative status\n indicator. A server MUST respond to a command issued when the\n session is in an incorrect state by responding with a negative status\n indicator. There is no general method for a client to distinguish\n between a server which does not implement an optional command and a\n server which is unwilling or unable to process the command.\n A POP3 server MAY have an inactivity autologout timer. Such a timer\n MUST be of at least 10 minutes' duration. The receipt of any command\n from the client during that interval should suffice to reset the\n autologout timer. When the timer expires, the session does NOT enter\n the UPDATE state--the server should close the TCP connection without\n removing any messages or sending any response to the client." }, { "section_number": "4.", "section_name": "The AUTHORIZATION State", "tag": "Section 4. The AUTHORIZATION State", "content": "Once the TCP connection has been opened by a POP3 client, the POP3\n server issues a one line greeting. This can be any positive\n response. An example might be:\n S: +OK POP3 server ready\n The POP3 session is now in the AUTHORIZATION state. The client must\n now identify and authenticate itself to the POP3 server. Two\n possible mechanisms for doing this are described in this document,\n the USER and PASS command combination and the APOP command. Both\n mechanisms are described later in this document. Additional\n authentication mechanisms are described in [RFC1734]. While there is\n no single authentication mechanism that is required of all POP3\n servers, a POP3 server must of course support at least one\n authentication mechanism.\n Once the POP3 server has determined through the use of any\n authentication command that the client should be given access to the\n appropriate maildrop, the POP3 server then acquires an exclusive-\n access lock on the maildrop, as necessary to prevent messages from\n being modified or removed before the session enters the UPDATE state.\n If the lock is successfully acquired, the POP3 server responds with a\n positive status indicator. The POP3 session now enters the\n TRANSACTION state, with no messages marked as deleted. If the\n maildrop cannot be opened for some reason (for example, a lock can\n not be acquired, the client is denied access to the appropriate\n maildrop, or the maildrop cannot be parsed), the POP3 server responds\n with a negative status indicator. (If a lock was acquired but the\n POP3 server intends to respond with a negative status indicator, the\n POP3 server must release the lock prior to rejecting the command.)\n After returning a negative status indicator, the server may close the\n connection. If the server does not close the connection, the client\n may either issue a new authentication command and start again, or the\n client may issue the QUIT command.\n After the POP3 server has opened the maildrop, it assigns a message-\n number to each message, and notes the size of each message in octets.\n The first message in the maildrop is assigned a message-number of\n \"1\", the second is assigned \"2\", and so on, so that the nth message\n in a maildrop is assigned a message-number of \"n\". In POP3 commands\n and responses, all message-numbers and message sizes are expressed in\n base-10 (i.e., decimal).\n Here is the summary for the QUIT command when used in the\n AUTHORIZATION state:\n QUIT\n Arguments: none\n Restrictions: none\n Possible Responses:\n +OK\n Examples:\n C: QUIT\n S: +OK dewey POP3 server signing off" }, { "section_number": "5.", "section_name": "The TRANSACTION State", "tag": "Section 5. The TRANSACTION State", "content": "Once the client has successfully identified itself to the POP3 server\n and the POP3 server has locked and opened the appropriate maildrop,\n the POP3 session is now in the TRANSACTION state. The client may now\n issue any of the following POP3 commands repeatedly. After each\n command, the POP3 server issues a response. Eventually, the client\n issues the QUIT command and the POP3 session enters the UPDATE state.\n Here are the POP3 commands valid in the TRANSACTION state:\n STAT\n Arguments: none\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n The POP3 server issues a positive response with a line\n containing information for the maildrop. This line is\n called a \"drop listing\" for that maildrop.\n In order to simplify parsing, all POP3 servers are\n required to use a certain format for drop listings. The\n positive response consists of \"+OK\" followed by a single\n space, the number of messages in the maildrop, a single\n space, and the size of the maildrop in octets. This memo\n makes no requirement on what follows the maildrop size.\n Minimal implementations should just end that line of the\n response with a CRLF pair. More advanced implementations\n may include other information.\n NOTE: This memo STRONGLY discourages implementations\n from supplying additional information in the drop\n listing. Other, optional, facilities are discussed\n later on which permit the client to parse the messages\n in the maildrop.\n Note that messages marked as deleted are not counted in\n either total.\n Possible Responses:\n +OK nn mm\n Examples:\n C: STAT\n S: +OK 2 320\n LIST [msg]\n Arguments:\n a message-number (optional), which, if present, may NOT\n refer to a message marked as deleted\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n If an argument was given and the POP3 server issues a\n positive response with a line containing information for\n that message. This line is called a \"scan listing\" for\n that message.\n If no argument was given and the POP3 server issues a\n positive response, then the response given is multi-line.\n After the initial +OK, for each message in the maildrop,\n the POP3 server responds with a line containing\n information for that message. This line is also called a\n \"scan listing\" for that message. If there are no\n messages in the maildrop, then the POP3 server responds\n with no scan listings--it issues a positive response\n followed by a line containing a termination octet and a\n CRLF pair.\n In order to simplify parsing, all POP3 servers are\n required to use a certain format for scan listings. A\n scan listing consists of the message-number of the\n message, followed by a single space and the exact size of\n the message in octets. Methods for calculating the exact\n size of the message are described in the \"Message Format\"\n section below. This memo makes no requirement on what\n follows the message size in the scan listing. Minimal\n implementations should just end that line of the response\n with a CRLF pair. More advanced implementations may\n include other information, as parsed from the message.\n NOTE: This memo STRONGLY discourages implementations\n from supplying additional information in the scan\n listing. Other, optional, facilities are discussed\n later on which permit the client to parse the messages\n in the maildrop.\n Note that messages marked as deleted are not listed.\n Possible Responses:\n +OK scan listing follows\n -ERR no such message\n Examples:\n C: LIST\n S: +OK 2 messages (320 octets)\n S: 1 120\n S: 2 200\n S: .\n ...\n C: LIST 2\n S: +OK 2 200\n ...\n C: LIST 3\n S: -ERR no such message, only 2 messages in maildrop\n RETR msg\n Arguments:\n a message-number (required) which may NOT refer to a\n message marked as deleted\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n If the POP3 server issues a positive response, then the\n response given is multi-line. After the initial +OK, the\n POP3 server sends the message corresponding to the given\n message-number, being careful to byte-stuff the termination\n character (as with all multi-line responses).\n Possible Responses:\n +OK message follows\n -ERR no such message\n Examples:\n C: RETR 1\n S: +OK 120 octets\n S: \n S: .\n DELE msg\n Arguments:\n a message-number (required) which may NOT refer to a\n message marked as deleted\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n The POP3 server marks the message as deleted. Any future\n reference to the message-number associated with the message\n in a POP3 command generates an error. The POP3 server does\n not actually delete the message until the POP3 session\n enters the UPDATE state.\n Possible Responses:\n +OK message deleted\n -ERR no such message\n Examples:\n C: DELE 1\n S: +OK message 1 deleted\n ...\n C: DELE 2\n S: -ERR message 2 already deleted\n NOOP\n Arguments: none\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n The POP3 server does nothing, it merely replies with a\n positive response.\n Possible Responses:\n +OK\n Examples:\n C: NOOP\n S: +OK\n RSET\n Arguments: none\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n If any messages have been marked as deleted by the POP3\n server, they are unmarked. The POP3 server then replies\n with a positive response.\n Possible Responses:\n +OK\n Examples:\n C: RSET\n S: +OK maildrop has 2 messages (320 octets)" }, { "section_number": "6.", "section_name": "The UPDATE State", "tag": "Section 6. The UPDATE State", "content": "When the client issues the QUIT command from the TRANSACTION state,\n the POP3 session enters the UPDATE state. (Note that if the client\n issues the QUIT command from the AUTHORIZATION state, the POP3\n session terminates but does NOT enter the UPDATE state.)\n If a session terminates for some reason other than a client-issued\n QUIT command, the POP3 session does NOT enter the UPDATE state and\n MUST not remove any messages from the maildrop.\n QUIT\n Arguments: none\n Restrictions: none\n Discussion:\n The POP3 server removes all messages marked as deleted\n from the maildrop and replies as to the status of this\n operation. If there is an error, such as a resource\n shortage, encountered while removing messages, the\n maildrop may result in having some or none of the messages\n marked as deleted be removed. In no case may the server\n remove any messages not marked as deleted.\n Whether the removal was successful or not, the server\n then releases any exclusive-access lock on the maildrop\n and closes the TCP connection.\n Possible Responses:\n +OK\n -ERR some deleted messages not removed\n Examples:\n C: QUIT\n S: +OK dewey POP3 server signing off (maildrop empty)\n ...\n C: QUIT\n S: +OK dewey POP3 server signing off (2 messages left)\n ..." }, { "section_number": "7.", "section_name": "Optional POP3 Commands", "tag": "Section 7. Optional POP3 Commands", "content": "The POP3 commands discussed above must be supported by all minimal\n implementations of POP3 servers.\n The optional POP3 commands described below permit a POP3 client\n greater freedom in message handling, while preserving a simple POP3\n server implementation.\n NOTE: This memo STRONGLY encourages implementations to support\n these commands in lieu of developing augmented drop and scan\n listings. In short, the philosophy of this memo is to put\n intelligence in the part of the POP3 client and not the POP3\n server.\n TOP msg n\n Arguments:\n a message-number (required) which may NOT refer to to a\n message marked as deleted, and a non-negative number\n of lines (required)\n Restrictions:\n may only be given in the TRANSACTION state\n Discussion:\n If the POP3 server issues a positive response, then the\n response given is multi-line. After the initial +OK, the\n POP3 server sends the headers of the message, the blank\n line separating the headers from the body, and then the\n number of lines of the indicated message's body, being\n careful to byte-stuff the termination character (as with\n all multi-line responses).\n Note that if the number of lines requested by the POP3\n client is greater than than the number of lines in the\n body, then the POP3 server sends the entire message.\n Possible Responses:\n +OK top of message follows\n -ERR no such message\n Examples:\n C: TOP 1 10\n S: +OK\n S: \n S: .\n ...\n C: TOP 100 3\n S: -ERR no such message\n UIDL [msg]\n Arguments:\n a message-number (optional), which, if present, may NOT\n refer to a message marked as deleted\n Restrictions:\n may only be given in the TRANSACTION state.\n Discussion:\n If an argument was given and the POP3 server issues a positive\n response with a line containing information for that message.\n This line is called a \"unique-id listing\" for that message.\n If no argument was given and the POP3 server issues a positive\n response, then the response given is multi-line. After the\n initial +OK, for each message in the maildrop, the POP3 server\n responds with a line containing information for that message.\n This line is called a \"unique-id listing\" for that message.\n In order to simplify parsing, all POP3 servers are required to\n use a certain format for unique-id listings. A unique-id\n listing consists of the message-number of the message,\n followed by a single space and the unique-id of the message.\n No information follows the unique-id in the unique-id listing.\n The unique-id of a message is an arbitrary server-determined\n string, consisting of one to 70 characters in the range 0x21\n to 0x7E, which uniquely identifies a message within a\n maildrop and which persists across sessions. This\n persistence is required even if a session ends without\n entering the UPDATE state. The server should never reuse an\n unique-id in a given maildrop, for as long as the entity\n using the unique-id exists.\n Note that messages marked as deleted are not listed.\n While it is generally preferable for server implementations\n to store arbitrarily assigned unique-ids in the maildrop,\n this specification is intended to permit unique-ids to be\n calculated as a hash of the message. Clients should be able\n to handle a situation where two identical copies of a\n message in a maildrop have the same unique-id.\n Possible Responses:\n +OK unique-id listing follows\n -ERR no such message\n Examples:\n C: UIDL\n S: +OK\n S: 1 whqtswO00WBw418f9t5JxYwZ\n S: 2 QhdPYR:00WBw1Ph7x7\n S: .\n ...\n C: UIDL 2\n S: +OK 2 QhdPYR:00WBw1Ph7x7\n ...\n C: UIDL 3\n S: -ERR no such message, only 2 messages in maildrop\n USER name\n Arguments:\n a string identifying a mailbox (required), which is of\n significance ONLY to the server\n Restrictions:\n may only be given in the AUTHORIZATION state after the POP3\n greeting or after an unsuccessful USER or PASS command\n Discussion:\n To authenticate using the USER and PASS command\n combination, the client must first issue the USER\n command. If the POP3 server responds with a positive\n status indicator (\"+OK\"), then the client may issue\n either the PASS command to complete the authentication,\n or the QUIT command to terminate the POP3 session. If\n the POP3 server responds with a negative status indicator\n (\"-ERR\") to the USER command, then the client may either\n issue a new authentication command or may issue the QUIT\n command.\n The server may return a positive response even though no\n such mailbox exists. The server may return a negative\n response if mailbox exists, but does not permit plaintext\n password authentication.\n Possible Responses:\n +OK name is a valid mailbox\n -ERR never heard of mailbox name\n Examples:\n C: USER frated\n S: -ERR sorry, no mailbox for frated here\n ...\n C: USER mrose\n S: +OK mrose is a real hoopy frood\n PASS string\n Arguments:\n a server/mailbox-specific password (required)\n Restrictions:\n may only be given in the AUTHORIZATION state immediately\n after a successful USER command\n Discussion:\n When the client issues the PASS command, the POP3 server\n uses the argument pair from the USER and PASS commands to\n determine if the client should be given access to the\n appropriate maildrop.\n Since the PASS command has exactly one argument, a POP3\n server may treat spaces in the argument as part of the\n password, instead of as argument separators.\n Possible Responses:\n +OK maildrop locked and ready\n -ERR invalid password\n -ERR unable to lock maildrop\n Examples:\n C: USER mrose\n S: +OK mrose is a real hoopy frood\n C: PASS secret\n S: -ERR maildrop already locked\n ...\n C: USER mrose\n S: +OK mrose is a real hoopy frood\n C: PASS secret\n S: +OK mrose's maildrop has 2 messages (320 octets)\n APOP name digest\n Arguments:\n a string identifying a mailbox and a MD5 digest string\n (both required)\n Restrictions:\n may only be given in the AUTHORIZATION state after the POP3\n greeting or after an unsuccessful USER or PASS command\n Discussion:\n Normally, each POP3 session starts with a USER/PASS\n exchange. This results in a server/user-id specific\n password being sent in the clear on the network. For\n intermittent use of POP3, this may not introduce a sizable\n risk. However, many POP3 client implementations connect to\n the POP3 server on a regular basis -- to check for new\n mail. Further the interval of session initiation may be on\n the order of five minutes. Hence, the risk of password\n capture is greatly enhanced.\n An alternate method of authentication is required which\n provides for both origin authentication and replay\n protection, but which does not involve sending a password\n in the clear over the network. The APOP command provides\n this functionality.\n A POP3 server which implements the APOP command will\n include a timestamp in its banner greeting. The syntax of\n the timestamp corresponds to the `msg-id' in [RFC822], and\n MUST be different each time the POP3 server issues a banner\n greeting. For example, on a UNIX implementation in which a\n separate UNIX process is used for each instance of a POP3\n server, the syntax of the timestamp might be:\n \n where `process-ID' is the decimal value of the process's\n PID, clock is the decimal value of the system clock, and\n hostname is the fully-qualified domain-name corresponding\n to the host where the POP3 server is running.\n The POP3 client makes note of this timestamp, and then\n issues the APOP command. The `name' parameter has\n identical semantics to the `name' parameter of the USER\n command. The `digest' parameter is calculated by applying\n the MD5 algorithm [RFC1321] to a string consisting of the\n timestamp (including angle-brackets) followed by a shared\n secret. This shared secret is a string known only to the\n POP3 client and server. Great care should be taken to\n prevent unauthorized disclosure of the secret, as knowledge\n of the secret will allow any entity to successfully\n masquerade as the named user. The `digest' parameter\n itself is a 16-octet value which is sent in hexadecimal\n format, using lower-case ASCII characters.\n When the POP3 server receives the APOP command, it verifies\n the digest provided. If the digest is correct, the POP3\n server issues a positive response, and the POP3 session\n enters the TRANSACTION state. Otherwise, a negative\n response is issued and the POP3 session remains in the\n AUTHORIZATION state.\n Note that as the length of the shared secret increases, so\n does the difficulty of deriving it. As such, shared\n secrets should be long strings (considerably longer than\n the 8-character example shown below).\n Possible Responses:\n +OK maildrop locked and ready\n -ERR permission denied\n Examples:\n S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>\n C: APOP mrose c4c9334bac560ecc979e58001b3e22fb\n S: +OK maildrop has 1 message (369 octets)\n In this example, the shared secret is the string `tan-\n staaf'. Hence, the MD5 algorithm is applied to the string\n <1896.697170952@dbc.mtview.ca.us>tanstaaf\n which produces a digest value of\n c4c9334bac560ecc979e58001b3e22fb" }, { "section_number": "8.", "section_name": "Scaling and Operational Considerations", "tag": "Section 8. Scaling and Operational Considerations", "content": "Since some of the optional features described above were added to the\n POP3 protocol, experience has accumulated in using them in large-\n scale commercial post office operations where most of the users are\n unrelated to each other. In these situations and others, users and\n vendors of POP3 clients have discovered that the combination of using\n the UIDL command and not issuing the DELE command can provide a weak\n version of the \"maildrop as semi-permanent repository\" functionality\n normally associated with IMAP. Of course the other capabilities of\n IMAP, such as polling an existing connection for newly arrived\n messages and supporting multiple folders on the server, are not\n present in POP3.\n When these facilities are used in this way by casual users, there has\n been a tendency for already-read messages to accumulate on the server\n without bound. This is clearly an undesirable behavior pattern from\n the standpoint of the server operator. This situation is aggravated\n by the fact that the limited capabilities of the POP3 do not permit\n efficient handling of maildrops which have hundreds or thousands of\n messages.\n Consequently, it is recommended that operators of large-scale multi-\n user servers, especially ones in which the user's only access to the\n maildrop is via POP3, consider such options as:\n * Imposing a per-user maildrop storage quota or the like.\n A disadvantage to this option is that accumulation of messages may\n result in the user's inability to receive new ones into the\n maildrop. Sites which choose this option should be sure to inform\n users of impending or current exhaustion of quota, perhaps by\n inserting an appropriate message into the user's maildrop.\n * Enforce a site policy regarding mail retention on the server.\n Sites are free to establish local policy regarding the storage and\n retention of messages on the server, both read and unread. For\n example, a site might delete unread messages from the server after\n 60 days and delete read messages after 7 days. Such message\n deletions are outside the scope of the POP3 protocol and are not\n considered a protocol violation.\n Server operators enforcing message deletion policies should take\n care to make all users aware of the policies in force.\n Clients must not assume that a site policy will automate message\n deletions, and should continue to explicitly delete messages using\n the DELE command when appropriate.\n It should be noted that enforcing site message deletion policies\n may be confusing to the user community, since their POP3 client\n may contain configuration options to leave mail on the server\n which will not in fact be supported by the server.\n One special case of a site policy is that messages may only be\n downloaded once from the server, and are deleted after this has\n been accomplished. This could be implemented in POP3 server\n software by the following mechanism: \"following a POP3 login by a\n client which was ended by a QUIT, delete all messages downloaded\n during the session with the RETR command\". It is important not to\n delete messages in the event of abnormal connection termination\n (ie, if no QUIT was received from the client) because the client\n may not have successfully received or stored the messages.\n Servers implementing a download-and-delete policy may also wish to\n disable or limit the optional TOP command, since it could be used\n as an alternate mechanism to download entire messages." }, { "section_number": "9.", "section_name": "POP3 Command Summary", "tag": "Section 9. POP3 Command Summary", "content": "Minimal POP3 Commands:\n USER name valid in the AUTHORIZATION state\n PASS string\n QUIT\n STAT valid in the TRANSACTION state\n LIST [msg]\n RETR msg\n DELE msg\n NOOP\n RSET\n QUIT\n Optional POP3 Commands:\n APOP name digest valid in the AUTHORIZATION state\n TOP msg n valid in the TRANSACTION state\n UIDL [msg]\n POP3 Replies:\n +OK\n -ERR\n Note that with the exception of the STAT, LIST, and UIDL commands,\n the reply given by the POP3 server to any command is significant\n only to \"+OK\" and \"-ERR\". Any text occurring after this reply\n may be ignored by the client." }, { "section_number": "10.", "section_name": "Example POP3 Session", "tag": "Section 10. Example POP3 Session", "content": "S: \n C: \n S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>\n C: APOP mrose c4c9334bac560ecc979e58001b3e22fb\n S: +OK mrose's maildrop has 2 messages (320 octets)\n C: STAT\n S: +OK 2 320\n C: LIST\n S: +OK 2 messages (320 octets)\n S: 1 120\n S: 2 200\n S: .\n C: RETR 1\n S: +OK 120 octets\n S: \n S: .\n C: DELE 1\n S: +OK message 1 deleted\n C: RETR 2\n S: +OK 200 octets\n S: \n S: .\n C: DELE 2\n S: +OK message 2 deleted\n C: QUIT\n S: +OK dewey POP3 server signing off (maildrop empty)\n C: \n S: " }, { "section_number": "11.", "section_name": "Message Format", "tag": "Section 11. Message Format", "content": "All messages transmitted during a POP3 session are assumed to conform\n to the standard for the format of Internet text messages [RFC822].\n It is important to note that the octet count for a message on the\n server host may differ from the octet count assigned to that message\n due to local conventions for designating end-of-line. Usually,\n during the AUTHORIZATION state of the POP3 session, the POP3 server\n can calculate the size of each message in octets when it opens the\n maildrop. For example, if the POP3 server host internally represents\n end-of-line as a single character, then the POP3 server simply counts\n each occurrence of this character in a message as two octets. Note\n that lines in the message which start with the termination octet need\n not (and must not) be counted twice, since the POP3 client will\n remove all byte-stuffed termination characters when it receives a\n multi-line response." }, { "section_number": "12.", "section_name": "References", "tag": "Section 12. References", "content": "[RFC821] Postel, J., \"Simple Mail Transfer Protocol\", STD 10, RFC\n 821, USC/Information Sciences Institute, August 1982.\n [RFC822] Crocker, D., \"Standard for the Format of ARPA-Internet Text\n [RFC1321] Rivest, R., \"The MD5 Message-Digest Algorithm\", RFC 1321,\n MIT Laboratory for Computer Science, April 1992.\n [RFC1730] Crispin, M., \"Internet Message Access Protocol - Version\n [RFC1734] Myers, J., \"POP3 AUTHentication command\", RFC 1734,\n Carnegie Mellon, December 1994." }, { "section_number": "13.", "section_name": "Security Considerations", "tag": "Section 13. Security Considerations", "content": "It is conjectured that use of the APOP command provides origin\n identification and replay protection for a POP3 session.\n Accordingly, a POP3 server which implements both the PASS and APOP\n commands should not allow both methods of access for a given user;\n that is, for a given mailbox name, either the USER/PASS command\n sequence or the APOP command is allowed, but not both.\n Further, note that as the length of the shared secret increases, so\n does the difficulty of deriving it.\n Servers that answer -ERR to the USER command are giving potential\n attackers clues about which names are valid.\n Use of the PASS command sends passwords in the clear over the\n network.\n Use of the RETR and TOP commands sends mail in the clear over the\n network.\n Otherwise, security issues are not discussed in this memo." }, { "section_number": "14.", "section_name": "Acknowledgements", "tag": "Section 14. Acknowledgements", "content": "The POP family has a long and checkered history. Although primarily\n a minor revision to RFC 1460, POP3 is based on the ideas presented in\n RFCs 918, 937, and 1081.\n In addition, Alfred Grimstad, Keith McCloghrie, and Neil Ostroff\n provided significant comments on the APOP command." }, { "section_number": "15.", "section_name": "Authors' Addresses", "tag": "Section 15. Authors' Addresses", "content": "John G. Myers\n Carnegie-Mellon University\n 5000 Forbes Ave\n Pittsburgh, PA 15213\n EMail: jgm+@cmu.edu\n Marshall T. Rose\n Dover Beach Consulting, Inc.\n 420 Whisman Court\n Mountain View, CA 94043-2186\n EMail: mrose@dbc.mtview.ca.us" }, { "section_number": "Appendix A.", "section_name": "Differences from RFC 1725", "tag": "Section Appendix A. Differences from RFC 1725", "content": "This memo is a revision to RFC 1725, a Draft Standard. It makes the\n following changes from that document:\n - clarifies that command keywords are case insensitive.\n - specifies that servers must send \"+OK\" and \"-ERR\" in\n upper case.\n - specifies that the initial greeting is a positive response,\n instead of any string which should be a positive response.\n - clarifies behavior for unimplemented commands.\n - makes the USER and PASS commands optional.\n - clarified the set of possible responses to the USER command.\n - reverses the order of the examples in the USER and PASS\n commands, to reduce confusion.\n - clarifies that the PASS command may only be given immediately\n after a successful USER command.\n - clarified the persistence requirements of UIDs and added some\n implementation notes.\n - specifies a UID length limitation of one to 70 octets.\n - specifies a status indicator length limitation\n of 512 octets, including the CRLF.\n - clarifies that LIST with no arguments on an empty mailbox\n returns success.\n - adds a reference from the LIST command to the Message Format\n section\n - clarifies the behavior of QUIT upon failure\n - clarifies the security section to not imply the use of the\n USER command with the APOP command.\n - adds references to RFCs 1730 and 1734\n - clarifies the method by which a UA may enter mail into the\n transport system.\n - clarifies that the second argument to the TOP command is a\n number of lines.\n - changes the suggestion in the Security Considerations section\n for a server to not accept both PASS and APOP for a given user\n from a \"must\" to a \"should\".\n - adds a section on scaling and operational considerations" }, { "section_number": "Appendix B.", "section_name": "Command Index", "tag": "Section Appendix B. Command Index", "content": "APOP ....................................................... 15\n DELE ....................................................... 8\n LIST ....................................................... 6\n NOOP ....................................................... 9\n PASS ....................................................... 14\n QUIT ....................................................... 5\n QUIT ....................................................... 10\n RETR ....................................................... 8\n RSET ....................................................... 9\n STAT ....................................................... 6\n TOP ........................................................ 11\n UIDL ....................................................... 12\n USER ....................................................... 13" } ]