Sieve GLOBAL + Sieve LOCAL
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!
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?
Is this what you are looking for? This is how I enforce spam rules prior to users' custom scripts.
#in dovecot configuration plugin { sieve_before = /var/lib/dovecot/sieve/global/default.sieve }
#In /var/lib/dovecot/sieve/global/default.sieve require ["fileinto"]; if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; stop; } else { keep; }
-- Matt Pallissard
Doesn't 'keep' imply 'stop'? What if your users want the email in a different folder that the INBOX?
Leave the 'else' clause off.
Bill
On 5/17/2017 4:07 PM, dovecot@pallissard.net wrote:
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? Is this what you are looking for? This is how I enforce spam rules prior to users' custom scripts.
#in dovecot configuration plugin { sieve_before = /var/lib/dovecot/sieve/global/default.sieve }
#In /var/lib/dovecot/sieve/global/default.sieve require ["fileinto"]; if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; stop; } else { keep; }
On Thu, May 18, 2017 at 07:29:15PM -0400, Bill Shirley wrote:
Doesn't 'keep' imply 'stop'? What if your users want the email in a different folder that the INBOX?
Leave the 'else' clause off.
It doesn't in this circumstance.
"For normal Sieve execution, "keep;" is equivalent to "fileinto "INBOX";", because both cause the message to be stored in INBOX. However, in sequential script execution, it only controls whether the next script is executed."
https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
-- Matt Pallissard
participants (3)
-
Bill Shirley
-
dovecot@pallissard.net
-
Luescher Claude