<<< Date Index >>>     <<< Thread Index >>>

Re: inaccurate estimates of message size



On Friday, 23 May 2008 at 16:07, dv1445@xxxxxxxxx wrote:

> Mutt (always has for me) made extremely inaccurate estimates of how
> big my email messages are.  Often off by a factor of 5.  Why is
> this?  Is it maybe not mutt's fault, but the IMAP servers I interact
> with?  On the one hand, I hope it's the servers' fault, because mutt
> is great.  On the other hand, I hope it's mutt's fault, because then
> maybe something can eventually be done about it.
> 
> Example: I open my INBOX, and there's a message that mutt says is
> 6.3K.  I open the message, and return to the inbox.  Now mutt says
> it's 0.3K.  It's a message with 5 words in the body and no
> attachments.  Then, I quit mutt, and fire it up again.  Mutt says
> 6.3K again! 

This is because mutt wants to display the size of the body
(subtracting out the headers) -- that's 0.3K. But until mutt fetches
the message, it only knows the full size of the message as reported by
the server (6.3K). IIRC there's no way to get the size of the headers
separated out in the initial header fetch. Personally I think the
right thing to do is to show the size of the message, headers and
all. Otherwise it might be better to cache the size in the hcache, but
that's waiting for some final safety cleanups of the hcache code.

> Mutt also does this with attachments.  Say I want to attach a PDF
> that I know for a fact is of size 125K.  I attach it in the compose
> window, and immediately mutt says that it's of size, say,
> 193K. (Sometimes mutt adds only several K, usually lots).  What's
> going on?  Is mutt doing something to the PDF?

Different effect -- mutt is encoding the binary data as base64, which
enlarges it dramatically. I think you can often get away with 8-bit
these days, but I doubt it's entirely safe.