Timo Sirainen wrote:
On Fri, 2006-05-12 at 12:31 +0200, Luca Corti wrote:
On Fri, 2006-05-12 at 18:02 +1000, Peter Fern wrote:
And while we're at feature-requests for -lda, I'd just like to reiterate a previous request for have a globally enforceable script that runs regardless of an existing user script, something like:
# Always run the global sieve script before user scripts global_script_enforce = 1
Then I guess we do two sieve runs if the user sieve script exists. I'm no C coder, but I might see if I can get a patch together for this...
I think you do not need any new config parameters here. I would just do a sequence run of scripts from specific to generic.
First execute per-user script, then per-domain script, then system-wide script. This way you can override more generic filters. Maybe some runs could be avoided if a previous run matches and acts.
The problem with this is that I'm not sure how exactly it should work. For example if the Sieve script has "keep" command, should it really save it to INBOX, or should it just ignore and let the next script handle it (and only use the final script's "keep")?
What if the first script eg. forwards the message somewhere, should the second script still be run?
I think there should be some "exit" command in Sieve so you could specify which behavior you want, but there isn't..
What I was thinking of doing is reading the two scripts, then concatenating them with the global script first, then processing. That way, the sieve recipes in the global script can simply either include or exclude the 'stop' directive to determine whether or not messages matched by the rule will be processed by the user scripts. It's quite nice really.