curl-library
Re: RFC: More imap patch.
Date: Wed, 7 Apr 2010 09:48:07 +0200
On 7 April 2010 02:18, Ben Greear <greearb_at_candelatech.com> wrote:
> On 04/06/2010 05:11 PM, Guenter wrote:
>>
>> Hi Ben,
>> Am 06.04.2010 20:50, schrieb Ben Greear:
>>>
>>> That URL example is straight out of the RFC for IMAP URLs.
>>> This will currently be a pain for users to interact with since we need
>>> some
>>> way to tell the users where one message stops and another starts. We'd
>>> probably need new start-msg/stop-msg callbacks or something like that.
>>
>> I believe the right approach would be to save each message into a
>> separate file, named either by the msgnum, or by its internal id. The
>> other case would be if someone pipes stdout to file, but then its ok to
>> have no further separators since then it would be close (if not
>> identical) to raw mailbox format.
>
> Imap doesn't include headers when you fetch the body, so it doesn't look
> anything like mbox format, unfortunately.
>
> At least in my case, I don't want it to save to files..I want all
> data sent to my application via the write callback, so while we might
> want an option to save as individual files...I don't want it to
> be the only way of doing things.
I haven't really thought about this, so I apologise if this is a
stupid suggestion :) but could the write callback be called with the
message's ID, so that you know which message you're dealing with?
i.e. so that you know that the current chunk of data given to the
callback is for a different message than a previous chunk with a
different message ID.
I agree that just saving the messages to different files should not be
the only option.
-- Michael Wood <esiotrot_at_gmail.com> ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-04-07