Bug 301154

Summary: Akonadi IMAP needs to translate entry names between METADATA (RFC 5464) and ANNOTATEMORE (draft-daboo-imap-annotatemore-08)
Product: [Frameworks and Libraries] Akonadi Reporter: Dennis Schridde <heri+kde>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: normal CC: grote, kdepim-bugs, mollekopf, vkrause
Priority: NOR    
Version: 4.8   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.4
Sentry Crash Report:

Description Dennis Schridde 2012-06-04 13:40:43 UTC
METADATA uses entry names in the style of /shared/vendor/kolab/folder-type, which includes the shared/private aspect of the data. [1]
ANNOTATEMORE uses entry names in the style of /vendor/kolab/folder-type and encodes the shared/private aspect in the special value.shared/private parameter. [2]

It appears that Akonadi IMAP tries to sync the contents of collectionannotations with the IMAP server using either one of the METADATA ANNOTATEMORE extensions, depending on what the server supports. However, it does not translate between the different notations of the entry name when communicating with the IMAP server.

It seems further that Akonadi Kolab receives the value of collectionannotations without any translation from Akonadi IMAP, while it expects ANNOTATEMORE semantics, i.e. /vendor/kolab/folder-type instead of /shared/vendor/kolab/folder-type. There should also be some translation done during the communication with Akonadi Kolab.

[1] http://tools.ietf.org/html/rfc5464#section-3.2.1
[2] http://tools.ietf.org/html/draft-daboo-imap-annotatemore-08#section-3.2.1
Comment 1 Dennis Schridde 2012-06-04 13:45:10 UTC
P.S: How did I gather this? When I set collectionannotations="/vendor/kolab/folder-type test" Akonadi IMAP reports an error from my IMAP server (dovecot-2.1.7 + dovecot-metadata-9), which complains about violation of RFC 5464 for the entry name. When I set it to /shared/..., Akonadi Kolab will stop showing up in Akonadi Console's Browser tab - apparently it stopped monitoring any IMAP folders.
Comment 2 Dennis Schridde 2013-01-13 01:02:32 UTC
Please note that there is another problem within Akonadi/IMAP where the METADATA IMAP extension is not used correctly: bug #313159
Comment 3 Christian Mollekopf 2013-11-06 14:32:31 UTC
Git commit 0f44d8dee614f616f070d816977c0368c4637c65 by Christian Mollekopf.
Committed on 28/10/2013 at 18:37.
Pushed by cmollekopf into branch 'KDE/4.11'.

Translate annotations from METADATA to ANNOTATEMORE style.

The IMAP proxy and the collectionannotationsattribute currently only
support shared annotations.
To match what kmail and the kolabproxy expect, we translate all METADATA
annotations (/shared/vendor/...) to ANNOTATEMORE (/vendor/....) and back
when writing.

M  +6    -6    resources/imap/addcollectiontask.cpp
M  +8    -8    resources/imap/changecollectiontask.cpp
M  +12   -1    resources/imap/retrievecollectionmetadatatask.cpp

http://commits.kde.org/kdepim-runtime/0f44d8dee614f616f070d816977c0368c4637c65
Comment 4 Dennis Schridde 2013-11-06 20:39:29 UTC
Thanks! Great to have this finally fixed.