[prev in list] [next in list] [prev in thread] [next in thread]
List: dovecot
Subject: [Sieve] Understand Sieve processing
From: h8h () dev-nu11 ! de (h8h)
Date: 2021-03-26 7:30:51
Message-ID: 4f2d7b91-1c3f-b2a9-d442-048d8aa89fe9 () dev-nu11 ! de
[Download RAW message or body]
Hi,
I have the following configuration:
> cat > /etc/dovecot/conf.d/99-local-sieve.conf << EOF;
> plugin {
> sieve_before = /etc/dovecot/sieve-spam.sieve
> sieve_before2 = /mail/sieve/global_before
> sieve_after = /mail/sieve/global_after
> sieve = /mail/sieve/%d/%n.sieve
> sieve_dir = /mail/sieve/%d/%n
> }
> EOF
> cat /etc/dovecot/sieve-spam.sieve
> require ["regex", "fileinto", "imap4flags"];
>
> if allof (header :regex "X-Spam-Status" "^Yes") {
> fileinto "Spam";
> }
(I removed the keyword "stop;" to proceed rule processing, which does
not work)
Now as a user (/mail/sieve/%d/%n.sieve) I want to create my own "Spam" rule:
> require ["regex","reject"];
> # rule:[SPAM]
> if allof (header :regex "x-spam-status" "^Yes")
> {
> reject text:
> This E-Mail is SPAM.
> .
> ;
> }
I activate the traces and see the following if the e-mail is SPAM:
> ## Started executing script 'sieve-spam'
> 3: jump if result is false
> 3: not jumping
> 4: fileinto action
> 4: store message in mailbox `Spam'
> ## Finished executing script 'sieve-spam'
If the e-mail is not SPAM:
> ## Started executing script 'sieve-spam'
> 3: jump if result is false
> 3: jumping to line 4
> ## Finished executing script 'sieve-spam'
>
>
> ## Started executing script 'roundcube'
> 3: jump if result is false
> 3: jumping to line 10
> ## Finished executing script 'roundcube'
So my sieve gets only executed if the e-mail is not SPAM. Thats a bit odd.
Could you explain how the sieve processing work and how I can solve this
problem?
dovecot --version
2.2.33.2 (d6601f4ec)
on Ubuntu 18.04 LTS
Best regards
Homy
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic