[Kde-pim] My Idea for GSoC Sieve project

Sanja Puvalic sanja.puvalic at gmail.com
Tue Mar 31 05:30:35 BST 2009


Hello Ingo,

I found some record of that talk! :D Here it is:
http://lists.kde.org/?l=kmail-devel&m=111796963625329
Now, after reading this, and talking with Thomas on IRC, I'm a bit confused.
Is there a Sieve parser integrated in KMail, and if yes, how is it
implemented or where can I find the code? I've been searching for the
"libksieve" which is mentioned in the document I linked to, but found
nothing I could use.

Also, I have sent an e-mail to Szymon Tomasz Stefanek who is planning to
work on a similar project (Akonadi Filtering Framework), so we could meet
on-line and try to synchronize our projects, so we could make a major
improvement to mail filtering overall :)

I also found a plug-in for Thunderbird that has a Sieve rules editor with a
small reference with it, and I think it's a good idea. It's written in
JavaScript. I still haven't had a change to try it out firsthand, because I
don't have an account on a server that supports Sieve. I've tried
registering on some, but most of them are commercial and ask for a fee if
you want to enable Sieve scripts. Does anyone know of a mail server I could
easily get an account on and try out Sieve?

Best,
Sanja


2009/3/25 Ingo Klöcker <kloecker at kde.org>

> On Tuesday 24 March 2009, Thomas McGuire wrote:
> > Hi Sanja,
> >
> > On Monday 23 March 2009 21:42:36 Sanja Puvalic wrote:
> > > Hello,
> > > I'm Sanja Puvalic, student from Belgrade University, Faculty of
> > > Mathematics.
> > >
> > > I have an idea how I would work on project "import/export for
> > > filtering rules in Sieve format in KMail"
> > > I already tried getting some feedback on the developers mailing
> > > list, and got no replies. I hope I'll be luckier here :)
> > > My idea in brief:
> > >
> > > - study the k-mail filter format
> > >
> > > - make a small parser using lex and yacc to convert to sieve format
> > > this in convinient because it's more flexible and the replacement
> > > can be done more automaticly - and we don't have to spend a lot of
> > > time writing code for parsing various commands in c++ - just try to
> > > fit the Kmail mail rule to the Kmail mail filters grammar which we
> > > can write, and automaticly generate a Sieve command
> > >
> > > - check if the server supports sieve
> > >     - if it does, upload to server
> > >     - if not, make exporting easy
> > >
> > > - exporting:
> > >
> > > if we can afford to make the export file readable (if we don't care
> > > about security and privacy issues), the mail rule export format
> > > could be very similar to a sieve command itself
> > > if not, we could do some simplest encrypting by, for example, just
> > > xor-ing the file to "sieve-is-cool", and then xor back when
> > > importing to kmail.
> > >
> > > Let me know what you think of my idea, am I on the right track? :)
> >
> > I think using the existing KMail GUI filter editor for editing Sieve
> > filter rules should be the goal of the project. Right now, there is
> > the menu entry Settings->Manage Sieve Scripts. In this dialog, you
> > should be able to use a GUI editor similar to the on in
> > Settings->Configure Filters, by reusing the classes used there.
> >
> > That means:
> > - The GUI editor should be able to export to native sieve
> > - KMail should be able to read sieve and set the GUI editor to the
> > rules that have been read
> > - If the current GUI editor doesn't support all Sieve rules, add
> > support for the missing rules
> >
> > I don't understand what you mean by "make a small parser using lex
> > and yacc to convert to sieve format". That sounds like you want to
> > parse the KMail config file format, but we already have a nice
> > in-memory representation of that, which we can use. Shouldn't it be
> > the other way around, and KMail needs to parse the sieve scripts, or
> > am I missing something here?
> >
> > About exporting: This I also don't fully understand. Can't we simply
> > export to the sieve format?
>
> One caveat: Some of KMail's filter criteria (like for example "is in
> address book") cannot be mapped to Sieve. So exporting all of KMail's
> filter rules to Sieve is impossible. Also many/most of the filter
> actions cannot be done by Sieve.
>
> I have discussed those problems with Martijn (and Thomas Zander?)
> several years ago during the KDE PIM meeting in Annahoeve and we came
> to the conclusion that one can only convert those filter rules to Sieve
> that precede the first filter rule that cannot be matched to Sieve.
>
>
> Regards,
> Ingo
>
> _______________________________________________
> 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/
>
_______________________________________________
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