3

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

krissi
  • 3,317
  • 1
  • 18
  • 22

2 Answers2

2

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.

  • SIEVE_GLOBAL_DIR is exactly what I needed. And I can confirm, it is as you said ;) Thanks a lot – krissi Sep 15 '10 at 07:56
  • sweet, my first bounty! I feel so *special*. :) –  Sep 15 '10 at 15:47
  • well, I got half of it - why didn't you award the whole thing to me? sad panda face. :( –  Sep 18 '10 at 13:00
  • I marked it as answer. I'm sorry, I did not realize that I need to mark it somewhere else too, it was my first bounty :( What should I have done to mark your post? – krissi Sep 18 '10 at 13:48
  • aha! no worries... ok, looked it up and it appears there's a Bounty link to click to "award" it as well, in addition to the normal question stuff. http://serverfault.com/faq#bounty oh well, we'll get 'er next time! –  Sep 18 '10 at 14:06
2

Sorry but i don't think the solution is right.

In dovecot 2.x.x doing

export SIEVE_GLOBAL_DIR=/some/other/path

won't work.

i have added the following line to the dovecot.conf file (inside the plugin section):

sieve_global_dir=/etc/dovecot/sieve/

And every think works!

Obviously that path must contain a sieve.global file.

Thank you.

user148687
  • 21
  • 1