imapsieve wrong matches on APPEND cause

Stephan Bosch stephan at rename-it.nl
Thu Aug 16 01:53:39 EEST 2018



Op 15/08/2018 om 15:47 schreef Alex Cherevko:
> Hello again,
>
> Does anybody have any comments on how to solve this?

I will look at this one soon.


>
> Thanks,
> Alex
>
> -----Original Message-----
> From: dovecot [mailto:dovecot-bounces at dovecot.org] On Behalf Of Alex
> Cherevko
> Sent: Tuesday, August 14, 2018 2:01 PM
> To: 'Aki Tuomi' <aki.tuomi at dovecot.fi>; dovecot at dovecot.org
> Subject: RE: imapsieve wrong matches on APPEND cause
>
> Hi,
>
>> Can you enable mail_log plugin, try again, and send updated logs?
>> Aki
> Sure, but logs contain same info.
>
> 1. When I move a message from Inbox to Spam it matches both rules and sieve
> executing both scripts in sequence:
>
> Debug: Spam: Mailbox opened because: SELECT
> Debug: imapsieve: mailbox Spam: APPEND event
> Debug: sieve: Pigeonhole version 0.4.21 (92477967) initializing
> Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.4.21
> (92477967) loaded
> Debug: sieve: Sieve Extprograms plugin for Pigeonhole version 0.4.21
> (92477967) loaded
> Debug: imapsieve: Static mailbox rule [1]: mailbox=`Spam' from=`*'
> causes=(COPY APPEND) =>
> before=`file:/var/vmail/sieve/global/learn-spam.sieve' after=(none)
> Debug: imapsieve: Static mailbox rule [2]: mailbox=`*' from=`Spam'
> causes=(COPY APPEND) =>
> before=`file:/var/vmail/sieve/global/learn-ham.sieve' after=(none)
> Debug: imapsieve: Matched static mailbox rule [2]
> Debug: imapsieve: Matched static mailbox rule [1]
> Debug: sieve: file storage: Using Sieve script path:
> /var/vmail/sieve/global/learn-spam.sieve
> Debug: sieve: file script: Opened script `learn-spam' from
> `/var/vmail/sieve/global/learn-spam.sieve'
> Debug: sieve: file storage: Using Sieve script path:
> /var/vmail/sieve/global/learn-ham.sieve
> Debug: sieve: file script: Opened script `learn-ham' from
> `/var/vmail/sieve/global/learn-ham.sieve'
> Debug: sieve: Opening script 1 of 2 from
> `/var/vmail/sieve/global/learn-spam.sieve'
> Debug: sieve: Loading script /var/vmail/sieve/global/learn-spam.sieve
> Debug: Spam: Mailbox opened because: lib-lda delivery
> Debug: Spam: Mailbox opened because: SELECT
>
> 2. When I move a message from Spam to Inbox none of the rules matched and
> thus nothing executed:
>
> Debug: INBOX: Mailbox opened because: SELECT
> Debug: imapsieve: mailbox INBOX: APPEND event
> Debug: sieve: Pigeonhole version 0.4.21 (92477967) initializing
> Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.4.21
> (92477967) loaded
> Debug: sieve: Sieve Extprograms plugin for Pigeonhole version 0.4.21
> (92477967) loaded
> Debug: imapsieve: Static mailbox rule [1]: mailbox=`Spam' from=`*'
> causes=(COPY APPEND) =>
> before=`file:/var/vmail/sieve/global/learn-spam.sieve' after=(none)
> Debug: imapsieve: Static mailbox rule [2]: mailbox=`*' from=`Spam'
> causes=(COPY APPEND) =>
> before=`file:/var/vmail/sieve/global/learn-ham.sieve' after=(none)
> Debug: INBOX: Mailbox opened because: SELECT
>
> Here is plugin section from dovecot.conf:
>
> plugin {
>
>      sieve_global_dir = /var/vmail/sieve/global/
>      sieve_plugins = sieve_imapsieve sieve_extprograms
>      sieve_before = /var/vmail/sieve/global/spam-global.sieve
>      sieve =
> file:/var/vmail/sieve/%d/%n/scripts;active=/var/vmail/sieve/%d/%n/active-scr
> ipt.sieve
>
>      #------------------------
>      # Spam learning
>      #------------------------
>
>      # From elsewhere to Spam folder
>      imapsieve_mailbox1_name = Spam
>      imapsieve_mailbox1_causes = COPY APPEND
>      imapsieve_mailbox1_before =
> file:/var/vmail/sieve/global/learn-spam.sieve
>
>      # From Spam folder to elsewhere
>      imapsieve_mailbox2_name = *
>      imapsieve_mailbox2_from = Spam
>      imapsieve_mailbox2_causes = COPY APPEND
>      imapsieve_mailbox2_before = file:/var/vmail/sieve/global/learn-ham.sieve
>
>      sieve_pipe_bin_dir = /usr/bin
>      sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
> +vnd.dovecot.debug
>
>      mail_log_events = delete undelete expunge save copy mailbox_create
> mailbox_delete mailbox_rename
>      mail_log_fields = uid box msgid size flags vsize from subject
> }
>
> Thanks,
> Alex
>
>



More information about the dovecot mailing list