[Dovecot] Sieve and global scripts
Hi Stephan Bosch,
there's any way to make the dovecot deliver agent (with sieve) load a "global sieve script" before load the user sieve file? I want to create some rules for every one, like: "if header contais: IS SPAM, move to SPAM BOX"... I made this today with a couple of "sed + awk" and a wraper for managesieve-login... but, this is definily not the best way to do this...
This is possible to do? (Even with change in the code)
Regards.
-- "Não deixe a faculdade atrapalhar seus estudos."
Hi Stephan I will love this feature too.
Allan, could you give some example of your wrapper. Thanks,
Andres
Allan Cassaro escribió:
Hi Stephan Bosch,
there's any way to make the dovecot deliver agent (with sieve) load a "global sieve script" before load the user sieve file? I want to create some rules for every one, like: "if header contais: IS SPAM, move to SPAM BOX"... I made this today with a couple of "sed + awk" and a wraper for managesieve-login... but, this is definily not the best way to do this...
This is possible to do? (Even with change in the code)
Regards.
Hi,
Since there already is support for including a global sieve script from within your personal sieve script, wouldn't it be easier to add a default sieve script in your /etc/skel/ dir that includes the global script include?
In that way it works out of the box for new users, but configuration can be changed/disabled by the user.
Not sure about existing users, though...
Regards, Tom
Andrés Yacopino schreef:
Hi Stephan I will love this feature too.
Allan, could you give some example of your wrapper. Thanks,
Andres
Allan Cassaro escribió:
Hi Stephan Bosch,
there's any way to make the dovecot deliver agent (with sieve) load a "global sieve script" before load the user sieve file? I want to create some rules for every one, like: "if header contais: IS SPAM, move to SPAM BOX"... I made this today with a couple of "sed + awk" and a wraper for managesieve-login... but, this is definily not the best way to do this...
This is possible to do? (Even with change in the code)
Regards.
Hi Stephan I will love this feature too.
Allan, could you give some example of your wrapper. Thanks, It is on my TODO list. However, doing this correctly is not as trivial as it may seem. There are a few semantical issues to resolve. For instance: should subsequent scripts be called if the one of the earlier ones execute discard? For instance, when a global script throws away the message, why execute the user's script (risking that it inadvertently restores the message)? Jutta Degener took some effort to describe a good way of handling multiple scripts (http://tools.ietf.org/id/draft-degener-sieve-multiscript-00.txt), but
Andrés Yacopino schreef: this draft document has been stale for quite a while now. Note that the behavior described in that document is completely different from executing multiple scripts in succession using the include extension.
I intend to implement it largely as specified in the multiscript document. But even if I implement it to the letter, the necessary changes needed in the interpreter are also not trivial.
This feature request has a relatively high priority. But first I need to match cmusieve's functionality (i.e. implement enotify:mailto) and finish all features that are now supported. There are quite a few bits and pieces that need more work.
Regards,
-- Stephan Bosch stephan@rename-it.nl
participants (4)
-
Allan Cassaro
-
Andrés Yacopino
-
Stephan Bosch
-
Tom Hendrikx