<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello!<div class=""><br class=""></div><div class="">Sorry for replying on this quite old thread, but I just found the issue in my config and would like to share it if anyone else is having the same problem.</div><div class=""><br class=""></div><div class="">My passdb is ldap-based and I included a possibility to enable extra mail_plugins via LDAP (I used it for debug purposes).</div><div class="">There was the line:</div><div class="">pass_attrs = userPassword=password,=userdb_mail_plugins=%{ldap:mailPlugins}</div><div class=""><div>Which caused the problem.</div><div><br class=""></div><div>It seems like these setting does not added enabled plugins to IMAP but overwrote all other mail_plugins settings. Unfortunately just adding “$mail_plugins” does not work here as well, so I had to add all my plugins here manually.</div><div><br class=""></div><div>Hope this help someone!</div><div><br class=""></div><div>Best,</div><div>Andreas</div><div><br class=""><blockquote type="cite" class=""><div class="">On 8. May 2018, at 08:53, Andreas Krischer <<a href="mailto:a.krischer@akbyte.com" class="">a.krischer@akbyte.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="" style="display: inline !important;">Check that sieve-test actually shows it would do what you expect it to do.</span></blockquote><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">sieve-test just shows: learn-spam: error: the imapsieve extension cannot be used outside IMAP.</div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Andreas</div><br class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" class=""><div class="">Am 07.05.2018 um 20:56 schrieb Aki Tuomi <<a href="mailto:aki.tuomi@dovecot.fi" class="">aki.tuomi@dovecot.fi</a>>:</div><br class="Apple-interchange-newline"><div class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">On 2018-05-07 20:58, Andreas Krischer wrote:</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi, folks!<br class=""><br class="">My problem:<br class="">I set up dovecot with imapsieve to execute a script whenever a user copies a mail to his Spam folder (spam autolearning). Unfortunately this script is never executed regardless what I’m configuring for imapsieve. It looks like dovecot doesn’t really load the plugin…<br class=""><br class="">The "dovecot -n" output is attached.<br class=""><br class="">I already tried setting imapsieve_mailbox1_name to *, but even this does not execute the script… Also I tried a mailbox without mail_crypt enabled, no success as well.<br class=""><br class="">In the attached mail.log (mail_debug=yes) you can see, that imap_sieve_plugin is loaded, but it isn’t really executed.<br class=""><br class="">The normal (LMTP) sieve is working - if a mail is incoming the sieve module shows it work in mail.log:<br class=""><br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: file storage: Storage path `/var/vmail/myhost.name/postmaster/sieve' not found<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: file storage: Storage path `/var/vmail/myhost.name/postmaster/.dovecot.sieve' not found<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: storage: No default script location configured<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: User has no personal script<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: file storage: Using script storage path: /etc/dovecot/sieve/after/<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: file script: Opened script `spam' from `/etc/dovecot/sieve/after/spam.sieve'<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: executed after user's Sieve script(1): /etc/dovecot/sieve/after/spam.sieve<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: Mailbox <lmtp DATA>: Opened mail UID=1 because: header Message-ID (Cache file is unusable)<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: Opening script 1 of 1 from `/etc/dovecot/sieve/after/spam.sieve'<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: Loading script /etc/dovecot/sieve/after/spam.sieve<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: Script binary /etc/dovecot/sieve/after/spam.svbin successfully loaded<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: binary save: not saving binary /etc/dovecot/sieve/after/spam.svbin, because it is already stored<br class="">May  7 17:54:04 dovecot dovecot: lmtp(<a href="mailto:postmaster@myhost.name" class="">postmaster@myhost.name</a>): Debug: YEm9ILyS8FqSaAAAujt/SA: sieve: Executing script from `/etc/dovecot/sieve/after/spam.svbin'<br class=""><br class=""><br class="">I already spent hours on this problem so please let me know if you have any idea what the problem could be… :(<br class=""><br class="">Thanks in advance!<br class=""><br class="">Andreas<br class=""><br class=""><br class=""><br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Check that sieve-test actually shows it would do what you expect it to do.</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Aki</span></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>