Stephan Bosch wrote:
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.
Actually that was a goof. What I meant was to discard the mail if it
had too many stars (it sounds better than saying X-Spam-Level was too high ;). Shame on me!
Jul 22 14:49:02 mail deliver(raub@domain.com): msgid=000d01ca078a$d13122a0$6400a8c0@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.
I just found the issue: I typed "X-Spam-Flag" instead of
"X-Spam-Status" as defined in the dovecot.conf. Oops! My typing skills are weak!
Regards,