Sieve: carry global variables from sieve_before to user sieve scripts

Alexander 'Leo' Bergolth leo at strike.wu.ac.at
Mon Oct 20 09:48:32 UTC 2014


Hi!

Is there a way to initialize global variables with default values in
sieve_before scripts that can be used in the sieve_default script or in
user scripts?

I've tried the following code but this doesn't work..

before.d/10-set-defaults.sieve:
-------------------- 8< --------------------
require ["variables", "include"];
require "vnd.dovecot.debug";
set "global.S_TESTVAR leo";
debug_log "LEO SIEVE: in before.d/10-set-defaults, S_TESTVAR:
${global.S_TESTVAR}";
-------------------- 8< --------------------

default.sieve:
-------------------- 8< --------------------
require ["variables", "include"];
require "vnd.dovecot.debug";

global "S_TESTVAR";
debug_log "LEO SIEVE: in default.sieve: S_TESTVAR: ${global.S_TESTVAR},
${S_TESTVAR}";
-------------------- 8< --------------------

Is there any other way to set up defaults in a global sieve script?

Cheers,
--leo
-- 
e-mail   ::: Leo.Bergolth (at) wu.ac.at
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria



More information about the dovecot mailing list