[Kde-pim] Messages without body
Kevin Krammer
kevin.krammer at gmx.at
Fri Jul 30 10:25:49 BST 2010
On Thursday, 2010-07-29, Ingo Klöcker wrote:
> On Thursday 29 July 2010, Kevin Krammer wrote:
> > Hi all,
> >
> > while writing unit tests for item fetching from the MixedMaildir
> > store, I've discovered inconsistencies between MBox and Maildir
> > regarding messages without body.
> >
> > The test data I am testing against has been created with KMail1, its
> > the same four messages for both MBox and Maildir.
> > I created all of them by sending new messages from one account to
> > another,
> >
> > For one of them I did not type anything into the main content area of
> > the composer.
>
> It seems KMail1 still adds an empty line as body (so it is not possible
> to create a message without body with KMail1). As test I created a
> message without body and a message with a single line of text (but no
> newline). I saved both messages as drafts (the drafts folder is mbox).
> After saving the message without body as draft the drafts mbox ended
> with two empty lines (i.e. in total with three '\n'). After saving the
> message with the single-line body as draft the drafts mbox ended with
> the single-line (i.e. with a single '\n').
>
> Now it gets tricky. If the last message in an mbox file does already end
> with an empty line (which is true for the message without body) then
> KMail1 does not add an extra empty line when appending the next message
> to the mbox file. OTOH, if the last message in an mbox file does not end
> with an empty line then KMail1 does (of course) add an extra empty line
> before appending the next message to the mbox file.
>
> IMO this is a bug in KMail1.
The question is which of the two is correct?
The maildir version of the message I have also ends in two newlines, so does
that mean the message in mbox (not at the end of the file) is wrong? (because
it doesn't have two newlines followed by the separator newline?)
> > But I first wanted to make sure it is not either a bug in libmaildir,
> > libmbox or KMime. [2]
>
> AFAICS there is no bug anywhere in libmaildir, libmbox or KMime. But
> there is the above mentioned inconsistency in KMail1's writing to mbox
> files and there is KMail1's inability to create messages without body
> (even if they later appear to be messages without body when reading them
> from an mbox file due to the former issue).
Should we make our new code consistent at least when writing?
Which of the two behaviors would be the one?
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100730/41a7665c/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list