[Dovecot] global sieve not working

Tom Hendrikx tom at whyscream.net
Tue Mar 29 17:04:51 EEST 2011


On 29/03/11 15:50, Barry Kwok wrote:
> On Tue, Mar 29, 2011 at 8:27 PM, Jim Knuth <jk at jkart.de> wrote:
> 
>> am 29.03.11 14:04 schrieb Tom Hendrikx <tom at whyscream.net>:
>>
>>
>>  On 29/03/11 13:22, Barry Kwok wrote:
>>>
>>>> My global sieve rule is not working and do not compile. But per-user
>>>> sieve
>>>> is working.
>>>> Here is my dovecot -n:
>>>>
>>>> log_path: /var/log/dovecot.log
>>>> protocols: imap pop3
>>>> ssl: no
>>>> login_dir: /var/run/dovecot/login
>>>> login_executable(default): /usr/libexec/dovecot/imap-login
>>>> login_executable(imap): /usr/libexec/dovecot/imap-login
>>>> login_executable(pop3): /usr/libexec/dovecot/pop3-login
>>>> mail_uid: 501
>>>> mail_gid: 501
>>>> mail_location:
>>>> maildir:/var/vmail/%u/Maildir/:INDEX=/var/vmail/%u/Maildir/
>>>> mail_debug: yes
>>>> mail_executable(default): /usr/libexec/dovecot/imap
>>>> mail_executable(imap): /usr/libexec/dovecot/imap
>>>> mail_executable(pop3): /usr/libexec/dovecot/pop3
>>>> mail_plugins(default): quota imap_quota acl imap_acl
>>>> mail_plugins(imap): quota imap_quota acl imap_acl
>>>> mail_plugins(pop3):
>>>> mail_plugin_dir(default): /usr/lib/dovecot/imap
>>>> mail_plugin_dir(imap): /usr/lib/dovecot/imap
>>>> mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
>>>> pop3_client_workarounds(default):
>>>> pop3_client_workarounds(imap):
>>>> pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
>>>> namespace:
>>>>   type: private
>>>>   separator: /
>>>>   inbox: yes
>>>>   list: yes
>>>>   subscriptions: yes
>>>> namespace:
>>>>   type: shared
>>>>   separator: /
>>>>   prefix: shared/%%u/
>>>>   location: maildir:%%Lh/Maildir:INDEX=%Lh/Maildir/shared/%%Lu
>>>>   list: children
>>>> lda:
>>>>   postmaster_address: root
>>>>   mail_plugins: sieve quota autocreate expire
>>>>   auth_socket_path: /var/run/dovecot/auth-master
>>>>   sieve_global_path: /var/vmail/sieve/dovecot.sieve
>>>>   log_path: /var/log/sieve.log
>>>> auth default:
>>>>   mechanisms: plain login
>>>>   default_realm: mydomain.net
>>>>   user: vmail
>>>>   username_chars:
>>>> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_+@
>>>>   passdb:
>>>>     driver: pam
>>>>   passdb:
>>>>     driver: sql
>>>>     args: /etc/dovecot-mysql.conf
>>>>   userdb:
>>>>     driver: passwd
>>>>   userdb:
>>>>     driver: sql
>>>>     args: /etc/dovecot-mysql.conf
>>>>   socket:
>>>>     type: listen
>>>>     client:
>>>>       path: /var/spool/postfix/dovecot-auth
>>>>       mode: 438
>>>>       user: postfix
>>>>       group: postfix
>>>>     master:
>>>>       path: /var/run/dovecot/auth-master
>>>>       mode: 438
>>>>       user: vmail
>>>>       group: vmail
>>>> plugin:
>>>>   quota: dict:user::proxy::quota
>>>>   quota: maildir
>>>>   quota_rule: *:storage=0
>>>>   acl: vfile
>>>>   acl_shared_dict: file:/var/spool/dovecot/shared-mailboxes.db
>>>>   expire: Trash 7 Trash/* 7 Junk 30
>>>>   expire_dict: proxy::expire
>>>>   sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
>>>> dict:
>>>>   quota: mysql:/etc/dovecot-dict-quota.conf
>>>>   expire: db:/var/lib/dovecot/expire.db
>>>>
>>>>
>>>>
>>>> By reading sieve.log, it simple ignore sieve_global_path:
>>>> /var/vmail/sieve/dovecot.sieve but the per user
>>>> sieve  /var/vmail/sieve/%Ld/%Ln/dovecot.sieve is working
>>>>
>>>>
>>>
>>> I had to do some searching for your sieve_global_path setting, as it is
>>> not in the 'plugin' section, but under 'lda'. Seems to me that this is
>>> your problem.
>>>
>>
>> I think, that`s right
>>
>> plugin/sieve_global_path = /etc/dovecot/sieve/global/global.sieve
>> plugin/sieve_global_dir = /etc/dovecot/sieve/global/
>>
>>
>>
>>> This ofcourse raises the question why doveconf -n lists the directive
>>> when it is misplaced...
>>>
>>>
>>> --
>>> Regards,
>>>        Tom
>>>
>>>
>>
>>
> I have set
>  sieve_global_dir: /var/vmail/sieve/
>   sieve_global_path: /var/vmail/sieve/dovecot.sieve
> in plugin section. But it still not working.
> 
> sievec have no compile error and I also set mail_debug on. But there is no
> info regarding this global sieve.

Last time I read up on this, the global sieve script was only executed
when no per-user script was available.

If you want to run both scripts, look into 'sieve_before' for the global
script. See http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration

--
Regards,
	Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20110329/05cc599a/attachment.bin 


More information about the dovecot mailing list