[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] [PATCH] fix IMAP filtering (Bug 95064)
From: Ingo =?iso-8859-15?q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2008-10-28 12:17:50
Message-ID: 200810281317.51262 () thufir ! ingo-kloecker ! de
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Tuesday 28 October 2008, Thomas McGuire wrote:
> Hi,
>
> On Sunday 26 October 2008 20:19:39 Thomas Neumann wrote:
> > the attached patch fixes filtering for online IMAP accounts (Bug
> > 95064). What it basically does is avoiding duplicate filtering (see
> > below for a discussion).
> >
> > There might be a simpler way to achieve the same goal, but
> > I could not come up with an alternative strategy that is as robust
> > regarding IMAP server behavior.
>
> UIDPLUS and a MD5-to-serialnumber map can be used for this, see
> below.
>
> > The basic problem is as follows: A new message arrives, KMail
> > filters it, and updates the filtered result back on the IMAP
> > server. Due to the asynchronous execution if IMAP accesses, it can
> > happen that KMail sees its own update (which is a delete+insert) as
> > new mail, triggering a new filter run (and creating a duplicate in
> > some cases, otherwise just filtering and re-filtering all over).
> >
> > The way I avoided this problem was to add a "filtered" flag in
> > MessageStatus, explicitly keeping track of already filtered
> > messages and refusing to filter them again. I don't think this can
> > be avoided, as all operations are asynchronous (e.g., new messages
> > might arrive in-between) and there does not seem to be a foolproof
> > way to detect that the "new" mail is really caused by an update.
> >
> > Comments/suggestions welcome, if you think this is the right
> > approach please commit it, as I do not have SVN write access.
>
> I finally managed to have a deeper look into this and found the
> following:
>
> IMAP filtering is indeed broken, although I could never reproduce
> duplicates. Did you find a way to reliably reproduce duplicates?
FWIW, I never saw duplicates. But occasionally I see infinite filtering,
i.e. the same message is filtered over and over again. This happens
only for large messages for which uploading takes a long time. My
unchecked theory is that this happens because KMail does already see
the message that is still being uploaded before the upload has been
completed. I have never seen this happen for smaller messages.
KMail adds the header X-KMail-Filtered with some number as content to
filtered messages. I guess this number is meant to be used for
correlating the filtered messages with the messages the IMAP server
reports as new. Maybe this mechanism has a bug or it is not fully
implemented.
Regards,
Ingo
["signature.asc" (application/pgp-signature)]
_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic