CentOS 6.5 x64
I'm trying to apply a Sieve filter to my mailserver (Postfix + Dovecot + Spamassassin) to automatically move spam mails to my Junk folder.
I've added sieve
to my /etc/dovecot/dovecot.conf
protocols.
This is my /etc/dovecot/conf.d/90-sieve.conf
:
plugin {
sieve = ~/.dovecot.sieve
sieve_global_path = /var/lib/dovecot/sieve/default.sieve
sieve_after = /var/lib/dovecot/sieve
sieve_dir = ~/sieve
sieve_global_dir = /var/lib/dovecot/sieve/
}
This is the content of /var/lib/dovecot/sieve/default.sieve
:
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
stop;
}
Which was compiled with sievec /var/lib/dovecot/sieve/default.sieve
My Spamassassin works correctly, in fact it adds the [SPAM] string before the subject of the emails and the X-Spam-Flag is set to YES.
I've already restarted dovecot and postfix.
No errors are reported in /var/log/maillog, running cat /var/log/maillog | grep sieve
does not return anything.
The problem: mails are not moved to Junk folder.
Looks like the sieve filter is not executed at all... How can I fix it?