-1

I'm trying to test a more modular approach to using sieve scripts on my mail server.

Previously I used .dovecot.sieve for everything but I now have conflicting requirements and I thought I'd test having a master script and including multiple includes.

It is dovecot 2.0.9.

I set the following:

sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve

When I do what I need directly in the .dovecot.sieve file it all works fine. But I just tried changing it to the following instead:

require ["include"];
include :personal "filing";
include :personal "vacation";

And when I compile it I get the following error:

# sievec .dovecot.sieve 
.dovecot: line 2: error: included personal script 'filing' does not exist. 
.dovecot: line 3: error: included personal script 'vacation' does not exist. 
.dovecot: error: validation failed.

But they do exist:

# ls -l sieve total 8
-rwxrwxrwx 1 root root 390 Aug 23 14:53 filing.sieve
-rwxrwxrwx 1 root root 740 Aug 23 15:04 vacation.sieve

So why is dovecot not seeing the includes?

I have tried chmod 777 in case it's permissions but that didn't help.

I've tried absolute path names, and putting the include files in different locations, renaming them to not have the sieve suffix, explicitly calling them WITH the sieve suffix but nothing works.

I can't use global because these are account specific requirements.

Does anyone have any ideas why the sievec is failing?

  • "Putting the file in different locations" is not really specific. Where did you try to put it? `:personal` reads the file script from the user's home directory as defined in the Dovecot configuration. Also: are you sure `sievec` picks up the correct Dovecot configuration? – Jens Erat Aug 23 '17 at 20:30
  • Thanks for the suggestions Jens, You were on the right track with sievec and the config. I discovered that whilst the sievec was failing, the autoresponder was actually working as designed, and auto-compiling the .svbin file. So the sievec error was a bit of a red-herring and sadly I cannot remember where I read that I needed to run sievec in the first place. I think it might only be necessary for :global rather than :personal. I'm going to mark this as the right answer in any case. Thanks. – sysadmin Aug 31 '17 at 13:30

2 Answers2

0

Jens was on the right track with sievec and the config. I discovered that whilst the sievec was failing, the autoresponder was actually working as designed, and auto-compiling the .svbin file. So the sievec error was a bit of a red-herring and sadly I cannot remember where I read that I needed to run sievec in the first place. I think it might only be necessary for :global rather than :personal.

Hope this helps anyone who has the same error - whilst I didn't fix the sievec error, I did find out that it was unnecessary and the .svbin file was being auto-compiled properly.

Thanks.

0

The problem is that when you run sievec it doesn't know which user you are and so doesn't know where ~/sieve is.

If you use the -u parameter for sievec then it should compile no problem.

chicks
  • 3,639
  • 10
  • 26
  • 36