sieve: active= doesn't seem to use bindir=
Hi,
I'm trying to set up dovecot to read sieve source files from a read-only directory, and save compiled binaries to a separate directory with the bindir option. That worked when I pointed the sieve option at a single file, but I just changed it to point at a directory and added the active= option, also pointing at a symlink in a read-only directory. It looks like dovecot is trying to save the compiled active script to the same directory as the source file, instead of to bindir. Am I missing something?
$ doveconf -n # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.13 (cdd19fe3) # OS: Linux 5.10.0-8-amd64 x86_64 Debian 11.0 ext4 ... plugin { sieve = file:/usr/local/etc/mail/%{domain}/%{username}/sieve;active=/usr/local/etc/mail/%{domain}/%{username}/sieve/.active.sieve;bindir=/var/cache/mail/%{domain}/%{username}/sieve sieve_before = file:/etc/dovecot/sieve-before sieve_filter_bin_dir = /etc/dovecot/sieve-filter-bin sieve_filter_exec_timeout = 30s sieve_global_extensions = +vnd.dovecot.filter sieve_plugins = sieve_extprograms sieve_user_log = /var/local/mail/persistent/mail/%{domain}/%{username}/sieve.log } ...
Relevant logs:
lmtp(david@mandelberg.org)<90751>
It looks like dovecot is trying to save the compiled active script to the same directory as the source file, instead of to bindir. Am I missing something?
sieve = file:/usr/local/etc/mail/%{domain}/%{username}/sieve;
active=/usr/local/etc/mail/%{domain}/%{username}/sieve/.active.sieve; bindir=/var/cache/mail/%{domain}/%{username}/sieve
Active= tells where to save the complied active script. In the above config it is being told to save to
/usr/local/etc/mail/%{domain}/%{username}/sieve/.active.sieve;
Which is the same directory as the scripts set with file:
/usr/local/etc/mail/%{domain}/%{username}/sieve
If you want the compiled to save in same path as bindir then change active to match
active=/var/cache/mail/%{domain}/%{username}/sieve/.active.sieve;
Op 05-10-2021 om 15:03 schreef dovecot@ptld.com:
It looks like dovecot is trying to save the compiled active script to the same directory as the source file, instead of to bindir. Am I missing something?
sieve = file:/usr/local/etc/mail/%{domain}/%{username}/sieve; active=/usr/local/etc/mail/%{domain}/%{username}/sieve/.active.sieve; bindir=/var/cache/mail/%{domain}/%{username}/sieve
Active= tells where to save the complied active script. In the above config it is being told to save to
/usr/local/etc/mail/%{domain}/%{username}/sieve/.active.sieve;
I thought active was where to read the active source script from? I'm not using managesieve, so I wouldn't expect dovecot to try writing to that file. I don't see anything in https://doc.dovecot.org/configuration_manual/sieve/configuration/ about active pointing at a compiled file, just stuff about it pointing at a source file.
Which is the same directory as the scripts set with file:
/usr/local/etc/mail/%{domain}/%{username}/sieve
If you want the compiled to save in same path as bindir then change active to match
active=/var/cache/mail/%{domain}/%{username}/sieve/.active.sieve;
Yup, I did that and it worked, but it doesn't seem to match the documentation. It's also slightly (but only slightly) annoying to have to write to the cache dir from my configuration management system, instead of writing to the source dir.
I thought active was where to read the active source script from? I'm not using managesieve, so I wouldn't expect dovecot to try writing to that file. I don't see anything in https://doc.dovecot.org/configuration_manual/sieve/configuration/ about active pointing at a compiled file, just stuff about it pointing at a source file.
Well yeah. The active= path tells dovecot to create a symlink pointing to the source file. But if you look at hidden files in that directory "ll -a" you will see a .svbin file was created with the symlink. I don't fully understand what is happening under the hood, i just know setting active works.
participants (2)
-
David Mandelberg
-
dovecot@ptld.com