How define sieve_global_dir in dovecot’s sieve-test

dovecotsieve

I created a few sieve (dovecot implementation) filter scripts and want to test them using sieve-test.

All scripts which are using global includes are failing with the following message

Error: sieve: include: sieve_global_dir not set for :global script include (wanted script 'bugzilla.sieve')

The sieve_global_dir is set in dovecot.conf and the include works when started by deliver.

How to define sieve_global_dir that it is read by sieve-test and sievec?

Thanks in advance

Best Answer

According to parts of the wiki and reading a little source code from dovecot.org:

http://wiki.dovecot.org/LDA/Sieve/Dovecot

...you should be able to do something like:

export SIEVE_DIR=/some/path
export SIEVE_GLOBAL_DIR=/some/other/path
sievec -d -P /some/file.sieve

The source is complicated, but if I read the Pigeonhole sieve sources correctly the lib-sieve/plugins/environment/ code will read in anything you define, and sievec has checks for setting these two values out of the environment when run. I can't confirm this though as I don't have it installed to test, YMMV.

Related Topic