[Dovecot] dovecot global sieve script problem
I cutover to a new server which uses Postfix & Dovecot to handle emails as opposed to Postfix & Courier in the old server.
Below is the contents of my global sieve script and dovecot config info. The dovecot-deliver.log does show that the email is being delivered to INBOX.spam but it ends up in the INBOX instead.
If I put the exact same rule in the user script, the emails are delivered into the INBOX.spam folder. Currently as a work around, I created user rules for all users and add this. For most users, it is the only rule.
So my question is, why does it not work with the global script? Any help would be appreciated.
Thanks, Dhaval
------------ contents of globalsieverc ------------- require ["fileinto"]; # Move spam to spam folder if header :contains "X-Spam-Flag" ["YES"] { fileinto "INBOX.spam"; stop; }
------------ dovecot -n output --------------------- # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-686-bigmem i686 Debian 6.0.1 xfs log_timestamp: %Y-%m-%d %H:%M:%S ssl_cert_file: /etc/ssl/certs/secure.consoe.com.pem ssl_key_file: /etc/ssl/certs/secure.consoe.com.key disable_plaintext_auth: no verbose_ssl: yes login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: maildir:/home/vmail/%u mbox_write_locks: fcntl dotlock namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmaster@patel.sh auth_socket_path: /var/run/dovecot/auth-master log_path: /home/vmail/dovecot-deliver.log mail_plugins: sieve global_script_path: /home/vmail/globalsieverc auth default: mechanisms: plain login passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: vmail plugin: sieve: /home/vmail/sieve/%n.sieve sieve_global_path: /home/vmail/globalsieverc
So my question is, why does it not work with the global script? Any help would be appreciated.
Please note the caveats listed here: http://wiki.dovecot.org/LDA/Sieve/Dovecot
[…] 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.
Did you manually compile the global script?
Thomas
On 6/26/2011 11:06 PM, Thomas Leuxner wrote:
So my question is, why does it not work with the global script? Any help would be appreciated. Please note the caveats listed here: http://wiki.dovecot.org/LDA/Sieve/Dovecot
[…] 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.
Did you manually compile the global script?
Actually, for the kind of behavior that you described you need to use the multiscript feature:
http://wiki.dovecot.org/LDA/Sieve/Dovecot#Executing_Multiple_Scripts_Sequent...
So, if you use sieve_before instead, it should work as required.
Regards,
Stephan.
participants (3)
-
Dhaval Patel
-
Stephan Bosch
-
Thomas Leuxner