[Kde-pim] My Idea for GSoC Sieve project

Ingo Klöcker kloecker at kde.org
Wed Mar 25 20:43:58 GMT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090325/58fe871c/attachment.sig>
-------------- next part --------------
_______________________________________________
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