Re: Zero byte appends

2010-07-17 Thread Rob Mueller



Some applications (e.g. Kolab) store other objects than Mail (e.g.
Addressbooks, Calendar, Tasks or Notes) in IMAP folders. They might
create empty objects for some reason.


Well that's pretty evil.  The objects should still have a header,
right?  Or do they just store blobs?


http://www.faqs.org/rfcs/rfc2822.html

So the body is optional (3.5), but in the headers (3.6), there has to be a 
Date and From header


  The only required header fields are the origination date field and
  the originator address field(s).  All other header fields are
  syntactically optional.  More information is contained in the table
  following this definition.

So really a 0 byte message is not a valid message.

Rob



Re: Zero byte appends

2010-07-16 Thread Bron Gondwana
On Fri, Jul 16, 2010 at 03:22:38PM +0200, Michael Menge wrote:
> Quoting Bron Gondwana :
> 
> >Can anyone think of any good reason we should allow zero byte
> >files to be appended via IMAP?  Just that I'm currently going
> >over the reconstruct code - and that's one of the few places
> >where it actually changes things.
> 
> Some applications (e.g. Kolab) store other objects than Mail (e.g.
> Addressbooks, Calendar, Tasks or Notes) in IMAP folders. They might
> create empty objects for some reason.

Well that's pretty evil.  The objects should still have a header,
right?  Or do they just store blobs?
 
> >Reconstruct will always unlink a zero byte file and remove the
> >record - but IMAP APPEND will actually create one.  We should
> >align the behaviour one way or the other!

If so, then reconstruct should let those messages stay!

Bron.


Re: Zero byte appends

2010-07-16 Thread Michael Menge

Quoting Bron Gondwana :


Can anyone think of any good reason we should allow zero byte
files to be appended via IMAP?  Just that I'm currently going
over the reconstruct code - and that's one of the few places
where it actually changes things.


Some applications (e.g. Kolab) store other objects than Mail (e.g.  
Addressbooks, Calendar, Tasks or Notes) in IMAP folders. They might

create empty objects for some reason.



Reconstruct will always unlink a zero byte file and remove the
record - but IMAP APPEND will actually create one.  We should
align the behaviour one way or the other!

Bron.







M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen

smime.p7s
Description: S/MIME Cryptographic Signature


Zero byte appends

2010-07-16 Thread Bron Gondwana
Can anyone think of any good reason we should allow zero byte
files to be appended via IMAP?  Just that I'm currently going
over the reconstruct code - and that's one of the few places
where it actually changes things.

Reconstruct will always unlink a zero byte file and remove the
record - but IMAP APPEND will actually create one.  We should
align the behaviour one way or the other!

Bron.