FW: imapsieve rules not matching at all?

dovecot at steve.wattlink.net dovecot at steve.wattlink.net
Sat Mar 20 01:37:33 EET 2021


Greetings!

 

I feel like this has been beaten to death, but my searches on the web (and
about 10 hours spent over the last two days) haven't revealed what's going
on.

 

Basically, it's the usual "I'd like to auto-learn spam/ham based on moves
to/from a folder" problem.  But in my debugging, I don't see any evidence
that the static rules are matching, so the scripts aren't running, which
makes me think I'm missing something obvious.

 

Below I list doveconf -n output, and some log snippets.  In my experiments,
I've tried removing the report-spam.sieve and report-ham.sieve scripts, and
absolutely nothing changed, which is why I think the rules aren't being
tried.

 

The requisite doveconf -n output:

- - - -8< - - - -

# 2.3.13 (89f716dc2): /usr/local/etc/dovecot/dovecot.conf

# Pigeonhole version 0.5.13 (cdd19fe3)

# OS: FreeBSD 12.2-RELEASE-p1 amd64  

# Hostname: mhv3

lock_method = dotlock

mail_attribute_dict = file:%h/Maildir/dovecot-attributes

mail_debug = yes

mail_location = maildir:~/Maildir

mail_privileged_group = mail

managesieve_notify_capability = mailto

managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date index ihave
duplicate mime foreverypart extracttext vnd.dovecot.debug
vnd.dovecot.environment imapsieve vnd.dovecot.imapsieve vnd.dovecot.pipe
vnd.dovecot.execute

namespace inbox {

  inbox = yes

  location = 

  mailbox Drafts {

    special_use = \Drafts

  }

  mailbox Junk {

    special_use = \Junk

  }

  mailbox Sent {

    special_use = \Sent

  }

  mailbox "Sent Messages" {

    special_use = \Sent

  }

  mailbox Trash {

    special_use = \Trash

  }

  prefix = 

}

passdb {

  driver = pam

}

plugin {

  imapsieve_mailbox1_before =
file:/usr/local/etc/dovecot/sieve/report-spam.sieve

  imapsieve_mailbox1_causes = COPY APPEND

  imapsieve_mailbox1_name = Spam

  imapsieve_mailbox2_before =
file:/usr/local/etc/dovecot/sieve/report-ham.sieve

  imapsieve_mailbox2_causes = COPY

  imapsieve_mailbox2_from = Spam

  imapsieve_mailbox2_name = *

  imapsieve_url = sieve://127.0.0.1:4190

  sieve = file:~/sieve;active=~/.dovecot.sieve

  sieve_before = /usr/local/etc/dovecot/sieve/common.sieve

  sieve_default = /usr/local/etc/dovecot/sieve/default.sieve

  sieve_default_name = SystemDefault

  sieve_execute_bin_dir = /usr/local/etc/dovecot/sieve/bin

  sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
+vnd.dovecot.execute +vnd.dovecot.debug

  sieve_filter_bin_dir = /usr/local/etc/dovecot/sieve/bin

  sieve_global = /usr/local/etc/dovecot/sieve

  sieve_pipe_bin_dir = /usr/local/etc/dovecot/sieve/bin

  sieve_plugins = sieve_imapsieve sieve_extprograms

  sieve_trace_addresses = no

  sieve_trace_debug = yes

  sieve_trace_dir = /var/log/dovecot/trace

  sieve_trace_level = matching

}

protocols = imap lmtp sieve

service imap-login {

  inet_listener imap {

    address = 127.0.0.1

  }

}

service managesieve-login {

  inet_listener sieve {

    port = 4190

  }

}

ssl_cert = </etc/ssl/services/dovecot.cert

ssl_dh = # hidden, use -P to show it

ssl_key = # hidden, use -P to show it

userdb {

  driver = passwd

}

protocol lda {

  mail_plugins = " sieve"

}

protocol imap {

  imap_metadata = yes

  mail_max_userip_connections = 30

  mail_plugins = " imap_sieve"

}

- - - ->8 - - - -

 

I see that the static rule ought to have matched, but it didn't?

 

- - - - 8<- - - -

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: sieve: Pigeonhole version 0.5.13 (cdd19fe3) initializing

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.5.13
(cdd19fe3) loaded

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: sieve: Sieve Extprograms plugin for Pigeonhole version 0.5.13
(cdd19fe3) loaded

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: imapsieve: Static mailbox rule [1]: mailbox=`Spam' from=`*'
causes=(COPY APPEND) =>
before=`file:/usr/local/etc/dovecot/sieve/report-spam.sieve' after=(none)

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: imapsieve: Static mailbox rule [2]: mailbox=`*' from=`Spam'
causes=(COPY) => before=`file:/usr/local/etc/dovecot/sieve/report-ham.sieve'
after=(none)

Mar 19 16:21:47 mhv3 dovecot[47532]: imap(steve)<47539><CdLa+uu9iNkYgsde>:
Debug: Mailbox Spam: Mailbox opened because: SELECT

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Loading modules from directory: /usr/local/lib/dovecot

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Module loaded: /usr/local/lib/dovecot/lib95_imap_sieve_plugin.so

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Effective uid=1001, gid=1000, home=/home/steve

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no,
list=yes, subscriptions=yes location=maildir:~/Maildir

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: maildir++: root=/home/steve/Maildir, index=, indexpvt=, control=,
inbox=/home/steve/Maildir, alt=

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Mailbox INBOX: Mailbox opened because: SELECT

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: imapsieve: mailbox INBOX: APPEND event

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: imapsieve: mailbox INBOX: Mailbox attribute /shared/imapsieve/script
not found

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: imapsieve: mailbox INBOX: Server attribute /shared/imapsieve/script
not found

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: sieve: Pigeonhole version 0.5.13 (cdd19fe3) initializing

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.5.13
(cdd19fe3) loaded

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: sieve: Sieve Extprograms plugin for Pigeonhole version 0.5.13
(cdd19fe3) loaded

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: imapsieve: Static mailbox rule [1]: mailbox=`Spam' from=`*'
causes=(COPY APPEND) =>
before=`file:/usr/local/etc/dovecot/sieve/report-spam.sieve' after=(none)

Mar 19 16:21:48 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: imapsieve: Static mailbox rule [2]: mailbox=`*' from=`Spam'
causes=(COPY) => before=`file:/usr/local/etc/dovecot/sieve/report-ham.sieve'
after=(none)

Mar 19 16:21:49 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Mailbox INBOX: Mailbox opened because: SELECT

Mar 19 16:21:54 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Mailbox INBOX: UID 77131: Opened mail because: prefetch

Mar 19 16:21:54 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Mailbox INBOX: UID 77131: Opened mail because: access

Mar 19 16:21:54 mhv3 dovecot[47532]: imap(steve)<47541><ROnt+uu9idkYgsde>:
Debug: Mailbox INBOX: UID 77131: Opened mail because: full mail

- - - ->8 - - - -

 

Thanks for clues,

 

-- 

Steve Watt   KD6GGD     PP-ASEL-IA   factories.words.yappy

Don't let your schooling get in the way of your education.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210319/66ee1c26/attachment-0001.html>


More information about the dovecot mailing list