Mauricio Tavares wrote:
I have the following global cmusieve scripts defined in /etc/dovecot/sieve, which is owned by the user deliver is run (virtual) as defined in the lda session of dovecot.conf:

global-spam.script ======================================

require ["fileinto"];
# Move spam to spam folder
if header :contains "X-Spam-Level" "********************" {
  fileinto "Spam";
  # Stop here so that we do not reply on spam
  stop;
}
elsif header :contains "X-Spam-Flag" "Yes" {
  fileinto "Spam";
  stop;
}

First of all, this script can be made simpler by using the anyof() Sieve command, avoiding the need to specify the spam delivery verdict multiple times.

Jul 22 14:49:02 mail deliver(r...@domain.com): msgid=<000d01ca078a$d13122a0$6400a...@chameleonsh>: saved mail to INBOX

Why?
Good question. Are you sure that the tested headers above are truly present in the message under consideration (check your INBOX)? I know that MailScanner uses custom headers and the SpamAssassin ones are not always produced in addition by default. For debugging purposes, could you put these rules inside the user's personal script (the .dovecot.sieve) to check whether these work at all?

I must say, I've never used CMUSieve's include support before, so I couldn't tell you whether there are any known issues with this.

Regards,

--
Stephan Bosch
step...@rename-it.nl

Reply via email to