On 03/16/2017 03:58 PM, Stephan Bosch wrote:
Op 3/16/2017 om 10:20 PM schreef Robert Moskowitz:
I am building a new mailserver on Centos7.
My sieve is created with:
mkdir /home/sieve cat <<EOF>/home/sieve/globalfilter.sieve || exit 1 require "fileinto"; if exists "X-Spam-Flag" { if header :contains "X-Spam-Flag" "NO" { } else { fileinto "Spam"; stop; } } if header :contains "subject" ["***SPAM***"] { fileinto "Spam"; stop; } EOF
chown -R vmail:mail /home/sieve
But in 90-sieve.conf there is the comment:
# A path to a global sieve script file, which gets executed ONLY # if user's private Sieve script doesn't exist. Be sure to # pre-compile this script manually using the sievec command line # tool. #sieve_global_path = /var/lib/dovecot/sieve/default.sieve
Do I run sievec on this script? Yes.
And I found the following comment on a blog, about 3 years old:
2: Having a user-defined sieve script will cancel out the global script for redirecting spam. In the dovecot.conf, get rid of the sieve_global_path and sieve_global_dir, and instead use: sieve_before = /path/to/global.sieve -- what this will do is make sure that the global script runs before any user scripts, which allows the spam redirecting to actually work.
What is current situation on this? That is usually good advice. The sieve_global_path setting is now called sieve_default, since it configures the default script for users that don't have a personal one.
And it is changes like this is why I am really trying for my notes to modify the provided files than replace them.
So, unless you want users to have the ability and necessity (!) to create their own spam handling rules once they create a personal script, use the sieve_before setting.
The sieve_before script also needs to be pre-compiled with sievec.
It seems to my reading that this is the same global.sieve script as what I am using now. That you earlier told me I need to pre-compile. Or am I missing something?