[Imap-uw] Re: location of uid of a message in a mbx folder
darren.jacobs at utoronto.ca
Thu Apr 21 11:35:35 PDT 2005
Mark Crispin wrote:
> I don't know what you mean by "the sizes from the message headers" but
> if you mean the bogus SVR4 Content-Length: header, that header is
> completely useless. Ignore it; you have to locate the internal
> start-of-message header, and manually calculate the message size.
> Note that traditional UNIX format uses LF-only newlines as in normal
> UNIX files, whereas mbox format uses CRLF-newlines; you have to
> account for that (you can not just copy the texts either). mbx format
> sizes are quite different.
I was refering to the RFC822 message size specified in the mbx header.
18-Apr-2005 15:57:59 -0400,*2762*;000000000001-00000000
for this header its 2762. I thought that I could simply read this, add
the previous offset and get the location of the next message header in
the folder. For instance, to get the location of the 2nd message in the
folder I'd add 2048 to the RFC822 message size of the first message (say
2762), and get the location in the file of the next message, that is
4810. Then I'd do a seek with this number to get to the appropriate
spot in the file.
However it seems that this message size number (a) is not what I think
it is or (b) not accurate as when I try doing the above I never get a
number that gets me to the right spot in the file. Its probably (a). I
was hoping to avoid having to calculate the message size manually by
More information about the Imap-uw