kdepim-runtime patch for standard IMAP flags in KMail (KDE bug 291332)

Posted on Tuesday, July 31, 2012 in FLOSS

kdepim-runtime patch for standard IMAP flags in KMail (KDE bug 291332)

This is a situation that I found at work: I use KMail and my co-workers use Thunderbird. We use a shared e-mail account and, when they reply to a message, I can see it as replied, but when I reply to a message from KMail, only KMail can see it as replied.
You can imagine where the problem may be and, after a little research, this is what I found.

As explained in KDE bug 291332, when you reply an e-mail from KMail, kdepim-runtime sets $REPLIED flag in the message, instead of \Answered flag as IMAP 4rev1 recommends in RFC 2060.
However, kdepim-runtime does recognize as replied a message flagged with any of both flags, either standard \Answered or proprietary $REPLIED.

So KMail will show as replied messages that have been replied from other e-mail clients (which use \Answered flag). But those other clients, which will look for \Answered flag, won’t recognize as replied those messages replied from KMail since kdepim-runtime only sets $REPLIED proprietary flag.

Since kdepim-runtime recognizes both flags but only sets $REPLIED, the fix seems easy: modifying kdepim-runtime so it sets \Answered flag. It seems so easy and so it is, I was using a patched kdepim-runtime for weeks more than a year without incidents and I don’t understand why the bug has been open for few months in KDE bugtracker without anybody providing a fix (until now). In fact, I don’t understand what reason led kdepim-runtime developers to use $REPLIED flag instead of \Answered.

Below, you’ll find a link to download the patch. Also Gentoo Linux ebuild from my overlay is provided and binary packages for Gentoo Linux and Sabayon Linux from binhosts from my overlay.
Bug evolution can be followed in KDE bugtracker.