[Kde-pim] My Idea for GSoC Sieve project
Thomas McGuire
mcguire at kde.org
Mon Mar 23 23:06:23 GMT 2009
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? We need to be able to import sieve anyway, for the GUI
editor. And I think false security like xor'ing the file is futile, leave that
part out, there is no need for it.
Regards,
Thomas
-------------- 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/20090324/a6657cb1/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