Re: POP3 STAT command
- Posted by Irv Mullins <irvm at ellijay.com> May 30, 2001
- 419 views
----- Original Message ----- From: <gertie at ad-tek.net> Subject: POP3 STAT command > > > On 29 May 2001, at 19:16, Irv Mullins wrote: > > > > > On Tue, 29 May 2001, Kat wrote: > > > > Anyone have any idea what practical use the STAT command is? > > ================= > > > > It gives the total # of undeleted messages and total size. > It didn't give me the size on this isp, and the form of the total number was odd too, > if it didn't correspond to RFC1725. LIST worked on 2 isps so far. > > Kat The number is in octets. If your mail server doesn't reply in the form +OK 2 1234 where 2 is the number of undeleted (not unread) messages, and 1234 is the total size in octets, then it isn't compliant. According to RFC 1725: (also RFC 1939) STAT is one of the non-optional commands: <quote> Here are the POP3 commands valid in the TRANSACTION state: STAT Arguments: none Restrictions: may only be given in the TRANSACTION state Discussion: 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. In order to simplify parsing, all POP3 servers required to use a certain format for drop listings. The positive response consists of "+OK" followed by a single space, the number of messages in the maildrop, a single space, and the size of the maildrop in octets. This memo makes no requirement on what follows the maildrop size. Minimal implementations should just end that line of the response with a CRLF pair. More advanced implementations may include other information. NOTE: This memo STRONGLY discourages implementations from supplying additional information in the drop listing. Other, optional, facilities are discussed later on which permit the client to parse the messages in the maildrop. Note that messages marked as deleted are not counted in either total. Possible Responses: +OK nn mm Examples: C: STAT S: +OK 2 320 </quote> Regards, Irv