[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2022-03-20 Thread Erik Quaeghebeur
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #30 from Erik Quaeghebeur  ---
I've been looking at this issue again. The KMail/Akonadi codebase is still to
scary for me in most places, so I tried to circumvent it and add this
functionality using SQL triggers directly in Akonadi's database. I'm using the
SQLite backend, but this should be similar for MySQL and Postgresql.

*TLDR: Using only SQL triggers, a flag added by another client can be synced
via IMAP to an Akonadi tag, but deleting it from another client does not work.
Adding and deleting from KMail does not sync to the IMAP server.*

For my experiments, I used DB browser for SQLite 
to add triggers and look at the database; it is a bit more convenient than the
functionality in Akonadiconsole. To test, I created two tags in Akonadi (via
KMail's config) and these have ids 3 and 5 in the TagTable. I used one flag,
with id 57 in the FlagTable. Flag 57 should be synced to tag 3. Tag 5 was used
for deeper investigations. (Obviously, the trigger would need to be made
flag/tag-agnostic, but this would require adding a FlagTagRelation table, which
would go to far for an initial test. It would also have been a waste of time.)

Then, I created the following triggers:

1. Adding tag 3 when flag 57 arrives in the database:
---
create trigger "insert_tag_from_flag" after insert on "PimItemFlagRelation"
when NEW.Flag_Id is 57
begin
insert or ignore into "PimItemTagRelation" values (NEW.PimItem_id, 3);
end
---
This works. The tag is added to the mail in KMail if in another client
(Trojita, Thunderbird) the tag is added to the mail.

2. Adding flag 57 when tag 3 arrives in the database:
---
create trigger "insert_flag_from_tag" after insert on "PimItemTagRelation"
when NEW.Tag_Id is 3
begin
insert or ignore into "PimItemFlagRelation" values (NEW.PimItem_id,
57);
end
---
This does not sync. The flag is added to the database, alright, but Akonadi
isn't aware of it and does not propagate it to the server. ⇒ This needs to be
coded in Akonadi/KMail.

3. Deleting tag 3 when flag 57 is removed in the database:
---
create trigger "delete_tag_from_flag" after delete on "PimItemFlagRelation"
when OLD.Flag_Id is 57
begin
delete from "PimItemTagRelation" where "PimItem_id" == "OLD.PimItem_id"
and "Tag_id" == 3;
insert into "PimItemTagRelation" values (OLD.PimItem_id, 5);
end
---
This does not persist. For a moment, the tag is removed, but then it is added
again, likely from another in-memory data structure. (I was keeping the mail
folder containing the mail with removed flag open in KMail.) To verify that
indeed the database commit works, the additional insert was added, which
confirms it does. ⇒ This needs to be coded in Akonadi/KMail.

4. Removing flag 57 when tag 3 is deleted in the database:
---
create trigger "delete_flag_from_tag" after delete on "PimItemTagRelation"
when OLD.Tag_Id is 3
begin
delete from "PimItemFlagRelation" where "PimItem_id" ==
"OLD.PimItem_id" and "Flag_id" == 57;
end
---
This does not sync. The flag is removed from the database, alright, but Akonadi
isn't aware of it and does not propagate it to the server. ⇒ This needs to be
coded in Akonadi/KMail.

So, while insightful to me, this idea doesn't really bring us closer. Into the
code we must go.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2021-10-29 Thread Dmitry Alexandrov
https://bugs.kde.org/show_bug.cgi?id=283020

Dmitry Alexandrov  changed:

   What|Removed |Added

 CC||d...@gnui.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2021-05-23 Thread Jaakko Kantojärvi
https://bugs.kde.org/show_bug.cgi?id=283020

Jaakko Kantojärvi  changed:

   What|Removed |Added

 CC||jaa...@n-1.fi

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2021-01-25 Thread Robert David
https://bugs.kde.org/show_bug.cgi?id=283020

Robert David  changed:

   What|Removed |Added

 CC||robert.david.public@gmail.c
   ||om

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-11-12 Thread Erik Quaeghebeur
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #29 from Erik Quaeghebeur  ---
(In reply to Christoph from comment #28)
> 1) a way to keep akonoditables in sync via control file(?) on IMAP (holding
> the tagattributetable and tabtable).
Akonadi already deals with the tags and keywords; IMHO it should just keep the
tags and IMAP keywords in sync like it already does with the IMAP system flags
(which are special keywords). It is just the interface in kmail that is
missing.

> 2) initialize a mail-storage-ressource (pop3/imap) , searching/importing
> tags via a slection-dialouge ?
I do not understand what you are suggesting here?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-11-12 Thread Christoph
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #28 from Christoph  ---
if this feature should one day find its way into production, there maybe some
tools needed to handle tags.

1) a way to keep akonoditables in sync via control file(?) on IMAP (holding the
tagattributetable and tabtable).

2) initialize a mail-storage-ressource (pop3/imap) , searching/importing tags
via a slection-dialouge ? 

RFC

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-07-05 Thread Christoph
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #27 from Christoph  ---
(In reply to Erik Quaeghebeur from comment #24)
> I've created a crowdfunding campaign on Bountysource. Let's see if we can
> get together sufficient funds to entice someone who can add this feature:
> 
> https://www.bountysource.com/issues/56301087-store-kmail-tags-in-imap-flags-
> like-thunderbird

there was a neat plugin for Mail.app in IOS (back in the days) 
https://web.archive.org/web/20080413101413/http://www.indev.ca/MailTags.html

it was about 30$ that time .. i was waiting since that days for Kmail to
implement such features.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-07-05 Thread Christoph
https://bugs.kde.org/show_bug.cgi?id=283020

Christoph  changed:

   What|Removed |Added

 CC||ilove...@mojo.cc

--- Comment #26 from Christoph  ---

> Everything needed is in Akonadi and KMail already;

Akonadi doesnt suite multiseated environments and cannot be automated via tags
set via sieve .. having these tags embedded in IMAP is a MUSTHAVE IMHO.

thanks for support
-c-

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-03-14 Thread quazgar
https://bugs.kde.org/show_bug.cgi?id=283020

quazgar  changed:

   What|Removed |Added

 CC||quaz...@posteo.de

--- Comment #25 from quazgar  ---
As of 5.7.3, the current state seems to be that Akonadi simply saves the tags
in the `pimitemtagrelation` table.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2019-03-14 Thread quazgar
https://bugs.kde.org/show_bug.cgi?id=283020

quazgar  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=405456

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2018-10-02 Thread Massimiliano Torromeo
https://bugs.kde.org/show_bug.cgi?id=283020

Massimiliano Torromeo  changed:

   What|Removed |Added

 CC||massimiliano.torromeo@gmail
   ||.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2018-04-20 Thread Gaël Le Baccon
https://bugs.kde.org/show_bug.cgi?id=283020

Gaël Le Baccon  changed:

   What|Removed |Added

 CC||gael.lebac...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2018-03-21 Thread Erik Quaeghebeur
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #24 from Erik Quaeghebeur  ---
I've created a crowdfunding campaign on Bountysource. Let's see if we can get
together sufficient funds to entice someone who can add this feature:

https://www.bountysource.com/issues/56301087-store-kmail-tags-in-imap-flags-like-thunderbird

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2018-02-08 Thread luisfe
https://bugs.kde.org/show_bug.cgi?id=283020

luisfe  changed:

   What|Removed |Added

 CC||lui...@lftabera.es

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-09-04 Thread Arthur Țițeică
https://bugs.kde.org/show_bug.cgi?id=283020

Arthur Țițeică  changed:

   What|Removed |Added

 CC||arthur+...@cloud.titeica.ro

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-05-30 Thread Steven Haigh
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #23 from Steven Haigh  ---
I've just gotten around to toying with kmail again in Fedora 26 Alpha.

I like it as a general client - but glaring shortcomings such as shared labels
/ tags are just about deal breakers.

Right now, I use roundcube mail when I'm out and about, k-9 Mail on android,
and currently thunderbird on desktops (which I really want to replace with
kmail) - and these 3 have no problems with the basic, well agreed tags /
labels.

I have hope that one day I can check this off the list of annoyances with kmail
:)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-05-19 Thread Denis Kurz
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #22 from Denis Kurz  ---
Sorry, Eric, I didn't mean to disregard your work. After all those "thanks for
your report/feedback" comments I wrote in the past, I thought I'd try a more
constructive approach. It seems this wasn't the right bug for it, though.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-05-19 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #21 from marvi...@gmx.de ---
first google hit:

https://serverfault.com/questions/115769/which-imap-flags-are-reliably-supported-across-most-mail-servers

says RFC3501 Section 2.3.2. This lists the mandatory flags (\Seen, \Answered,
...), which all server implementations must implement.

But there are also "user-defined" flags "\*" (which is our topic), which are
not implemented by all servers (e.g. M$ doesn't).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-05-19 Thread Erik Quaeghebeur
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #20 from Erik Quaeghebeur  ---
(In reply to Denis Kurz from comment #19)
> To all reporters: Please remember that you can always make it easier for a
> developer to work on a bug/request by providing references to relevant
> standards, making detailed suggestions etc. Noone wants to work on a six
> year old request if she has to put a week of research into it first. In this
> case: Are IMAP flags even supposed to be used like this? If so, can you link
> to the related RFC or some other source?

Please remember to read through the comments before posting something implying
that the other posters have done tool little. See my comments 9, 10, and 12 to
realize that the developers are fully up to speed about tags and IMAP flags.
Everything needed is in Akonadi and KMail already; the work is just an
extension of existing functionality. We are ready to give feedback about any
remaining details as needed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2017-05-19 Thread Denis Kurz
https://bugs.kde.org/show_bug.cgi?id=283020

Denis Kurz  changed:

   What|Removed |Added

 CC||kde...@posteo.de
Version|Git (master)|5.5.1

--- Comment #19 from Denis Kurz  ---
Implementing this would have a nice side effect or two. Akonadi was meant to be
an offline cache for stuff like e-mail. Akonadi tags, however, add completely
new functionality. If tags are stored as IMAP tags, however, Akonadi's task
would then be reduced to caching again. Also, if Akonadi's db is corrupted for
whatever reasons, or I decide to switch db backends, or some faulty IMAP server
suddenly presents old mail with new IDs, or whatever, Akonadi would not lose
all the old tags. It would only have to re-index them. This approach seems a
lot less error-prone to me when compared to the current tag system.

To all reporters: Please remember that you can always make it easier for a
developer to work on a bug/request by providing references to relevant
standards, making detailed suggestions etc. Noone wants to work on a six year
old request if she has to put a week of research into it first. In this case:
Are IMAP flags even supposed to be used like this? If so, can you link to the
related RFC or some other source?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2016-05-07 Thread OlafLostViking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=283020

OlafLostViking  changed:

   What|Removed |Added

 CC||olaf.the.lost.viking@gmail.
   ||com

-- 
You are receiving this mail because:
You are watching all bug changes.


[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2016-05-07 Thread Philipp Verpoort via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=283020

Philipp Verpoort  changed:

   What|Removed |Added

 CC||philipp.verpo...@secure.mai
   ||lbox.org

--- Comment #18 from Philipp Verpoort  ---
Just want to express again that this would be a very useful feature.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2016-01-06 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #17 from marvi...@gmx.de ---
just tried (also 4.14.10) and see no change. KMail does not show flags added by
my Sieve script nor does it store "marks" using IMAP flags. Instead it still
adds "Tags" like akonadi:?tag=5.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2016-01-05 Thread Vladislav Vorobiev via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=283020

--- Comment #16 from Vladislav Vorobiev  ---
(In reply to Vladislav Vorobiev from comment #15)
> My experience says that some importan't features or bugs kde team simply
> ignore, 
> Using kontact or Kmail accross many computers seems to be not realy
> important.
> I try to vote for it.

Oha, it works in  KMail 4.14.10 for me...
Thanks great KDE team!

-- 
You are receiving this mail because:
You are watching all bug changes.


[kmail2] [Bug 283020] Store Kmail Tags in IMAP flags, like Thunderbird

2016-01-05 Thread Vladislav Vorobiev via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=283020

Vladislav Vorobiev  changed:

   What|Removed |Added

 CC||v...@piratweb.com

--- Comment #15 from Vladislav Vorobiev  ---
My experience says that some importan't features or bugs kde team simply
ignore, 
Using kontact or Kmail accross many computers seems to be not realy important.
I try to vote for it.

-- 
You are receiving this mail because:
You are watching all bug changes.