Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 2 down vote accepted
+25

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.

share|improve this answer
    
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 7:56
    
sweet, my first bounty! I feel so special. :) –  troyengel 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. :( –  troyengel 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. serverfault.com/faq#bounty oh well, we'll get 'er next time! –  troyengel Sep 18 '10 at 14:06

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.