cURL / Mailing Lists / curl-library / Single Mail


Re: RFC: More imap patch.

From: Michael Wood <>
Date: Wed, 7 Apr 2010 09:48:07 +0200

On 7 April 2010 02:18, Ben Greear <> 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 <>
List admin:
Received on 2010-04-07