Sieve GLOBAL + Sieve LOCAL

Luescher Claude stargate at tango.lu
Tue May 16 16:40:33 EEST 2017


Hello List,

I am using dovecot:


ii  dovecot-antispam                   2.0+20130822-2            amd64   
      Dovecot plugins for training spam filters
ii  dovecot-core                       1:2.2.10-1                amd64   
      secure POP3/IMAP server - core files
ii  dovecot-imapd                      1:2.2.10-1                amd64   
      secure POP3/IMAP server - IMAP daemon
ii  dovecot-ldap                       1:2.2.10-1                amd64   
      secure POP3/IMAP server - LDAP support
ii  dovecot-lmtpd                      1:2.2.10-1                amd64   
      secure POP3/IMAP server - LMTP server
ii  dovecot-managesieved               1:2.2.10-1                amd64   
      secure POP3/IMAP server - ManageSieve server
ii  dovecot-mysql                      1:2.2.10-1                amd64   
      secure POP3/IMAP server - MySQL support
ii  dovecot-pop3d                      1:2.2.10-1                amd64   
      secure POP3/IMAP server - POP3 daemon
ii  dovecot-sieve                      1:2.2.10-1                amd64   
      secure POP3/IMAP server - Sieve filters support

doveconf -n | grep -i sieve

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 ihave editheader vnd.dovecot.duplicate
   sieve = ~/.dovecot.sieve
   sieve_after = ~/sieve_after
   sieve_dir = ~/sieve
   sieve_extensions = +editheader +vnd.dovecot.duplicate
   sieve_max_redirects = 20
protocols = " imap lmtp sieve pop3"
service managesieve-login {
   inet_listener sieve {
   mail_plugins = " quota sieve"
   mail_plugins = " quota sieve"

I would like to have a Global and per user based Local sieve_before 
file.

Since doveconf does not indicate I believe my version does not support:

sieve_global_path

     A path to a global sieve script file, which gets executed ONLY if 
user's private Sieve script doesn't exist, e.g. 
/var/lib/dovecot/default.sieve. Be sure to pre-compile this script 
manually using the sievec command line tool, as explained below.

But what I would need is execute a global sieve_before for all users to 
apply some spam selection rules. Did anybody easily achieved it?

An obvious workaround would be to create a script which goes through all 
current users mail directories and creates a sieve_before script with 
the settings I need and then modify the user creation to do the same 
when new mailboxes get created.

Thank you!


More information about the dovecot mailing list