[Kde-pim] Filtering in KMail & moves to online IMAP folders

Till Adam till at kdab.net
Thu May 29 21:25:00 BST 2008



On Thursday 29 May 2008 22:20:10 Thomas McGuire wrote:
> Hi,
>
> On Monday 26 May 2008 00:09:04 Ingo Klöcker wrote:
> > On Sunday 25 May 2008, Thomas McGuire wrote:
> > > I'm trying to figure out why filters which move a message to an
> > > online IMAP folder in KMail does not work.
> > >
> > > It seems that in KMFilterActionMove::process(), moving to online
> > > folders is explicitly disabled when the action scheduler is not used.
> > > The comment says "The old filtering system does not support online
> > > IMAP targets".
> > >
> > > - Is it correct that the action scheduler is actually never used? Why?
> >
> > In KMail 1.9.9 it is used for filtering online IMAP.
>
> Ah right, in trunk as well:
> if (ActiononScheduler::isEnabled() ||
>     kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget())
> in KMAcctImap::postProcessNewMail().
> isEnabled() returns false for me, so that only gets enabled when moving
> messages to online IMAP folders.
>
> > > - Is it dangerous to enable moving to online IMAP folders
> > > unconditionally? If yes, why? And why does the comment claim that "the
> > > old filtering system" does not support that?
> >
> > I don't remember the details, but I think there is a reason why the old
> > filtering system does not allow moving to online IMAP folders.
>
> Hmm, probably. I don't see an immediate reason in the code (and no comments
> of course). I'm tempted to just enable it, it would be for manually
> filtering only anyway (which does not use the action scheduler, the message
> is moved in KMFilterMgr::process(), which seems OK to me (it calls
> KMFolderImap::addMsg() in the end).

addMsg() does not actually add the message to the folder, for online imap, 
that requires a folderjob, which is asynchronous. Since the main filter code 
cannot handle that, the action scheduler is needed. Enabling online IMAP 
folders as targets of filter move actions will lose mail, as only the envelope 
will be added locally, to the cache, but the mail will not actually be 
uploaded to the server.


Till

-- 
Till Adam
KDAB - platform independent software services
_______________________________________________
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