[Dovecot] Question about sieve script execution
Hi,
after reading the wiki about sieve_before/sieve_after and sieve_global_path, it's still unclear to me if: sieve_before scripts are executed if no user script exists, but a global script is defined.
The reason I ask, is because I'd like to use the same script, so that I don't have to maintain two scripts to apply "company policy" or "global features". It seems implicit from this sentence, but I've been taught not to assume implicitness by various pieces of software ;)
"This is not possible using the sieve_global_path setting, because that is only used when the user's private script does not exist."
Mel
Hi,
after reading the wiki about sieve_before/sieve_after and sieve_global_path, it's still unclear to me if: sieve_before scripts are executed if no user script exists, but a global script is defined. At least one (the first) sieve_before script is always executed, irrespective of whether the user's personal script or the script defined with sieve_global_path exist. If sieve_before refers to more than one
Mel Flynn schreef: script (i.e. it points to a directory), subsequent scripts in that directory are executed as long as preceding scripts have a 'keep' verdict.
The reason I ask, is because I'd like to use the same script, so that I don't have to maintain two scripts to apply "company policy" or "global features". It seems implicit from this sentence, but I've been taught not to assume implicitness by various pieces of software ;) Specifying sieve_before will do the trick.
"This is not possible using the sieve_global_path setting, because that is only used when the user's private script does not exist." Yes, sieve_global_path merely serves as a means to provide default behavior, i.e. behavior that can be overridden by the user by uploading a personal script. In contrast, there is no way the user can prevent the execution of the sieve_before scripts.
The sieve_after setting is a different story. It could be used to change what happens when the user's script yields 'keep'. It is mainly provided for completeness and I have not found very common uses for it, although I believe it is actually being used at some sites. Users can prevent execution of sieve_after by using fileinto "INBOX" in stead of keep in their personal script.
Regards,
-- Stephan Bosch stephan@rename-it.nl
On Thursday 03 September 2009 01:13:49 Stephan Bosch wrote:
Mel Flynn schreef:
Hi,
after reading the wiki about sieve_before/sieve_after and sieve_global_path, it's still unclear to me if: sieve_before scripts are executed if no user script exists, but a global script is defined.
At least one (the first) sieve_before script is always executed, irrespective of whether the user's personal script or the script defined with sieve_global_path exist.
Ah, so I should really use sieve_before and don't use sieve_global_path. If I specify them both and point to the same file, I risk the script being executed twice or errors.
-- Mel
participants (2)
-
Mel Flynn
-
Stephan Bosch