[Kde-pim] What is X-KMail-Identity header ?

Ingo Klöcker kloecker at kde.org
Thu Mar 27 22:21:02 GMT 2014


On Wednesday 26 March 2014 11:28:32 Daniel Vrátil wrote:
> On Monday 24 of March 2014 19:18:44 Martin Koller wrote:
> > What is the mail header X-KMail-Identity used for ?
> 
> I *think* it's ID of the KMail Identity from which the message was
> sent.

I confirm this. This header should be stripped from the message before 
it is sent. It is used to select the correct identity in the composer if 
the message is edited (e.g. as draft or in the outbox before sending).


> > I'm thinking how I can solve the item removal problems we have in
> > the mbox resource and I think a way would be to be able to identify
> > each single message in a unique way (as the current way for the
> > remote ids by using the position inside the file is very bad, as
> > all remoteIds must be changed whenever an item above it is
> > removed). Is it allowed to add new headers to mails ?
> > 
> > E.g. I'm thinking about the following: When the mbox resource reads
> > the mbox file, it checks each mail if a special header exists
> > (let's call it X-Akonadi-Id) and if not it adds that header and
> > writes all mails back into the mbox file. The X-Akonadi-Id header
> > would contain some unique id, e.g. the Akonadi::Item id()
> 
> This sounds rather expensive and will cause a huge slowdown and IO
> after every single change (and subsequent compaction). I don't have a
> better solution though.

It will also lead to a duplicate "unique id" if such a message is 
copied, so we could as well use the Message-id header which every 
message should already have and which is supposed to be globally unique. 
Also, we will still have to store (and update) the location of each 
message inside the mbox file in Akonadi to allow quick access without 
having to reparse the mbox file everytime it's opened.

Another option would be to use a separate database (table) for storing 
the location which is used exclusively by the mbox resource. A primary 
key of this table could be used as remote id in Akonadi instead of the 
offset in the mbox file. This way the remote id of a message in an mbox 
folder wouldn't change which would solve the update problem. Of course, 
the locations still need to be updated when the mbox file is changed, 
but this could be done in a single database transaction and wouldn't 
lead to a change notification storm in Akonadi.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140327/36db4f85/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