Aaron Nabil writes...
>Stat is only supposed to include un-marked-for-deletion messages for
>both the size and enumeration values, not just the size as qmail
>is doing.
A couple people asked me for "more info", here's an extract from
rfc1939 that describes the STAT command. The important bit is
the "Note that messages marked as deleted are not counted in either
total." line.
I don't know if this bug breaks any maintstream clients, but it sure
had a funny result on my web-based POP email tool, when you deleted
a messages the count of remaining messages would stay the same!
I've put the patch in http://www.spiritone.com/~nabil/popstatbug.diff ,
sorry if the "fuzz" is way off, I have some other patches in my local
copy.
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 are 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
--
Aaron Nabil