Pigeonhole Sieve only runs scripts if in users' home directories, or if Sieve is purposely broken
Hi,
Dovecot version is 2.3.19.1 (9b53102964) running on fully up-to-date Debian 12 (Bookworm) operating system.
For the life of me I cannot figure out how to get sieve scripts working correctly in a central directory location. Calling them from users’ home directories works fine (as described below).
(Note: This system has recently been migrated from Cyrus IMAP, so some of the directories for a central location are very similar to what would find in a standard Cyrus IMAP installation.)
If I set sieve
to its default value of file:~/sieve;active=~/.dovecot.sieve
in conf.d/90-sieve.conf
, sieve works as expected. I have a file ~/sieve/default.sieve
and, as per documentation, I make a symbolic link ~/.dovecot.sieve
that points to that file. The sieve script runs, and I see a default.svbin
either created or updated in the ~/sieve directories as emails arrive.
Setting sieve
to file:~/lib/sieve;active=~/.dovecot.sieve
also works as expected. So this verifies I can change the directory where sieve scripts are stored.
However, if I then set sieve
to file:/var/spool/dovecot/home/%1n/user/%n/sieve;active=file:/var/spool/dovecot/home/%1n/user/%n/.dovecot.sieve
, again a default.sieve
in each of these user’s centralized sieve
directories, sieve scripts silently fail to run. No messages of any kind found in any log files.
So, with the same exact same configuration as one that is the default and as proven to working, with the single exception of changing the top-level directory (TLD) for the scripts, results in silent failure. Why?
What I find particularly odd is that if I keep sieve
set to this central directory location (i.e., no config changes), and mv sieve/default.sieve sieve.tmp; rmdir sieve; mv sieve.tmp
, that is, have a *file* called sieve
where the setting sieve
points to (which, per docs and experience, should be a *directory*), the users’ sieve scripts *do* run, but with a warning along the lines of Warning: sieve: file storage: Explicitly specified active script path
file:/var/spool/dovecot/home/m/user/morse/.dovecot.sieve' is ignored; storage path /var/spool/dovecot/home/m/user/morse/sieve' is not a directory
.
In the docs I see that sieve
used to refer to a file (PidgeonHole Sieve v.0.31 or prior, I believe), and there is mention of a a sieve_dir
setting (which I have *never* set or used). So my guess is that sieve working in this centralized TLD with sieve
as a file rather than directory is due to support for some deprecated config / functionality.
I have fiddle around with this for some hours, including setting and not setting mail_home
to the central directory location (i.e., mail_home
in conf.d/10-mail.conf
set to the same value as sieve
in conf.d/90-sieve.conf
),to no avail. No matter what I do, I cannot get sieve scripts to run in a centralized directory location as they do under /home
. The only exception is as just described in the preceding paragraph. But the solution only allows a user to have a single sieve script, and I imagine managesieve
will not work properly is sieve is set up as described in the preceding paragraph.
What am I missing or doing incorrectly?
Any and all assistance most appreciated.
Doug
My apologies, a small inaccuracy:
Below where I mention .svbin files being created, I incorrectly described what is occurring. If the sieve
is set to the default of users’ home directories etc., the file .dovecot.svbin
is created in the user’s home directory. If sieve
is set to the centralized location, then there is no .dovecot.svbin
but rather a sieve.svbin
created or updated there. Also a bit confusing.
Am 15.05.2024 um 18:18 schrieb Douglas Morse morse@ikrg.com:
Hi,
Dovecot version is 2.3.19.1 (9b53102964) running on fully up-to-date Debian 12 (Bookworm) operating system.
For the life of me I cannot figure out how to get sieve scripts working correctly in a central directory location. Calling them from users’ home directories works fine (as described below).
(Note: This system has recently been migrated from Cyrus IMAP, so some of the directories for a central location are very similar to what would find in a standard Cyrus IMAP installation.)
If I set
sieve
to its default value offile:~/sieve;active=~/.dovecot.sieve
inconf.d/90-sieve.conf
, sieve works as expected. I have a file~/sieve/default.sieve
and, as per documentation, I make a symbolic link~/.dovecot.sieve
that points to that file. The sieve script runs, and I see adefault.svbin
either created or updated in the ~/sieve directories as emails arrive.Setting
sieve
tofile:~/lib/sieve;active=~/.dovecot.sieve
also works as expected. So this verifies I can change the directory where sieve scripts are stored.However, if I then set
sieve
tofile:/var/spool/dovecot/home/%1n/user/%n/sieve;active=file:/var/spool/dovecot/home/%1n/user/%n/.dovecot.sieve
, again adefault.sieve
in each of these user’s centralizedsieve
directories, sieve scripts silently fail to run. No messages of any kind found in any log files.So, with the same exact same configuration as one that is the default and as proven to working, with the single exception of changing the top-level directory (TLD) for the scripts, results in silent failure. Why?
What I find particularly odd is that if I keep
sieve
set to this central directory location (i.e., no config changes), andmv sieve/default.sieve sieve.tmp; rmdir sieve; mv sieve.tmp
, that is, have a *file* calledsieve
where the settingsieve
points to (which, per docs and experience, should be a *directory*), the users’ sieve scripts *do* run, but with a warning along the lines ofWarning: sieve: file storage: Explicitly specified active script path
file:/var/spool/dovecot/home/m/user/morse/.dovecot.sieve' is ignored; storage path/var/spool/dovecot/home/m/user/morse/sieve' is not a directory
.In the docs I see that
sieve
used to refer to a file (PidgeonHole Sieve v.0.31 or prior, I believe), and there is mention of a asieve_dir
setting (which I have *never* set or used). So my guess is that sieve working in this centralized TLD withsieve
as a file rather than directory is due to support for some deprecated config / functionality.I have fiddle around with this for some hours, including setting and not setting
mail_home
to the central directory location (i.e.,mail_home
inconf.d/10-mail.conf
set to the same value assieve
inconf.d/90-sieve.conf
),to no avail. No matter what I do, I cannot get sieve scripts to run in a centralized directory location as they do under/home
. The only exception is as just described in the preceding paragraph. But the solution only allows a user to have a single sieve script, and I imaginemanagesieve
will not work properly is sieve is set up as described in the preceding paragraph.What am I missing or doing incorrectly?
Any and all assistance most appreciated.
Doug
On 15/05/2024 18:27, Douglas Morse via dovecot wrote:
My apologies, a small inaccuracy:
Below where I mention .svbin files being created, I incorrectly described what is occurring. If the
sieve
is set to the default of users’ home directories etc., the file.dovecot.svbin
is created in the user’s home directory. Ifsieve
is set to the centralized location, then there is no.dovecot.svbin
but rather asieve.svbin
created or updated there. Also a bit confusing.
maybe you have a sieve_default setting that is affecting this.
Am 15.05.2024 um 18:18 schrieb Douglas Morsemorse@ikrg.com:
Hi,
Dovecot version is 2.3.19.1 (9b53102964) running on fully up-to-date Debian 12 (Bookworm) operating system.
For the life of me I cannot figure out how to get sieve scripts working correctly in a central directory location. Calling them from users’ home directories works fine (as described below).
(Note: This system has recently been migrated from Cyrus IMAP, so some of the directories for a central location are very similar to what would find in a standard Cyrus IMAP installation.)
If I set
sieve
to its default value offile:~/sieve;active=~/.dovecot.sieve
inconf.d/90-sieve.conf
, sieve works as expected. I have a file~/sieve/default.sieve
and, as per documentation, I make a symbolic link~/.dovecot.sieve
that points to that file. The sieve script runs, and I see adefault.svbin
either created or updated in the ~/sieve directories as emails arrive.Setting
sieve
tofile:~/lib/sieve;active=~/.dovecot.sieve
also works as expected. So this verifies I can change the directory where sieve scripts are stored.However, if I then set
sieve
tofile:/var/spool/dovecot/home/%1n/user/%n/sieve;active=file:/var/spool/dovecot/home/%1n/user/%n/.dovecot.sieve
, again adefault.sieve
in each of these user’s centralizedsieve
directories, sieve scripts silently fail to run. No messages of any kind found in any log files.
I don't believe that the active option can take the "file:" prefix.
John
So, with the same exact same configuration as one that is the default and as proven to working, with the single exception of changing the top-level directory (TLD) for the scripts, results in silent failure. Why?
What I find particularly odd is that if I keep
sieve
set to this central directory location (i.e., no config changes), andmv sieve/default.sieve sieve.tmp; rmdir sieve; mv sieve.tmp
, that is, have a *file* calledsieve
where the settingsieve
points to (which, per docs and experience, should be a *directory*), the users’ sieve scripts *do* run, but with a warning along the lines ofWarning: sieve: file storage: Explicitly specified active script path
file:/var/spool/dovecot/home/m/user/morse/.dovecot.sieve' is ignored; storage path/var/spool/dovecot/home/m/user/morse/sieve' is not a directory
.In the docs I see that
sieve
used to refer to a file (PidgeonHole Sieve v.0.31 or prior, I believe), and there is mention of a asieve_dir
setting (which I have *never* set or used). So my guess is that sieve working in this centralized TLD withsieve
as a file rather than directory is due to support for some deprecated config / functionality.I have fiddle around with this for some hours, including setting and not setting
mail_home
to the central directory location (i.e.,mail_home
inconf.d/10-mail.conf
set to the same value assieve
inconf.d/90-sieve.conf
),to no avail. No matter what I do, I cannot get sieve scripts to run in a centralized directory location as they do under/home
. The only exception is as just described in the preceding paragraph. But the solution only allows a user to have a single sieve script, and I imaginemanagesieve
will not work properly is sieve is set up as described in the preceding paragraph.What am I missing or doing incorrectly?
Any and all assistance most appreciated.
Doug
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
Apologies, just to be completely explicit, I should have stated that of course in every configuration I mentioned the .dovecot.sieve
file always pointed to the user’s main sieve script, wherever I may have placed it at the time.
So for example my centralized configuration is as follows when mirroring the default configuration but in a non-home top-level-directory (TLD):
/var/spool/dovecot/home/m/user/morse/.dovecot.sieve -> /var/spool/dovecot/home/m/user/morse/sieve/default.sieve
which does not work, and as follows when it does (with the warning that specified sieve location is a file rather than a script):
/var/spool/dovecot/home/m/user/morse/.dovecot.sieve -> /var/spool/dovecot/home/m/user/morse/sieve
Am 15.05.2024 um 18:18 schrieb Douglas Morse via dovecot dovecot@dovecot.org:
However, if I then set
sieve
tofile:/var/spool/dovecot/home/%1n/user/%n/sieve;active=file:/var/spool/dovecot/home/%1n/user/%n/.dovecot.sieve
, again adefault.sieve
in each of these user’s centralizedsieve
directories, sieve scripts silently fail to run. No messages of any kind found in any log files.
participants (2)
-
Douglas Morse
-
John Fawcett