On Sat, Mar 10, 2001 at 01:12:13PM -0500, John R Levine wrote:
> The usual mailbox vs. maildir war has flared up on inet-access, and points
> out a bug in qmail-pop3d. When you do a LIST command, it gives you the
> size of each message. Pop3d just reports the file sizes, while it's clear
> from the RFC that it's supposed to report the wire size of each message,
> i.e., the size using cr/lf as a line terminator, so the sizes it reports
> are too small.
>
> I gather nobody's ever reported this as a bug, and I expect that the only
> thing that uses the size is the "don't download bigger than size X" option
> for which it's close enough, but it's still wrong.
If I mis-remember correctly, qpopper may have a similar problem in
that the stated size does not necessarily match the size sent down the
wire. How so? Because qpopper adds X-UIDL and Status: headers to the
out-going message (perhaps it includes this in the size calc but I
haven't looked at the code in such a long time, or perhaps it only
adds those headers when the mail is re-written).
> I use courier-imap, and its POP daemon does get the sizes right,
> presumably by reading the files and adding the number of \n characters.
A more sensible strategy might be to introduce a new "info" flag (say
'3' equals POP wire size) on the filename, eg, a 10,000 byte email has
a name something like this:
Maildir/new/980195114.16740.geex:2,RS3,10000
Optimally the wire-size is calculated when the mail is written to
Maildir/tmp/ and then applied as an "info" flag when the file is moved
to Maildir/new/.
A possible complication with this approach is that my reading of
Maildir infers that "info" can only be set when the file moves from
Maildir/new/ to Maildir/cur/.
Regards.