Sieve dict and bindir question

Alessio Cecchi alessio at skye.it
Wed May 3 10:30:19 EEST 2017


Il 30/04/2017 18:29, Stephan Bosch ha scritto:
> Op 4/28/2017 om 10:58 AM schreef Alessio Cecchi:
>> Hi,
>>
>> I have setup the latest Dovecot and Sieve with dict in order to read
>> rules from MySQL and works fine:
>>
>> sieve_before = dict:proxy::sieve;name=activesql;bindir=~/.sieve-bin
>>
>> dict {
>>    sieve = mysql:/etc/dovecot/dovecot-dict-sieve-sql.conf.ext
>> }
>>
>> # cat /etc/dovecot/dovecot-dict-sieve-sql.conf.ext
>>
>> connect = host=10.1.1.1 dbname=dovecot user=dovecot password=Ciao
>> map {
>>      pattern = priv/sieve/name/$script_name
>>      table = user_sieve_scripts
>>      username_field = username
>>      value_field = id
>>      fields {
>>          script_name = $script_name
>>      }
>> }
>> map {
>>      pattern = priv/sieve/data/$id
>>      table = user_sieve_scripts
>>      username_field = username
>>      value_field = script_data
>>      fields {
>>          id = $id
>>      }
>> }
>>
>> But when I update the rules in mysql sieve continue to apply only the
>> "old" rules stored in the binary. The only way to apply the new rules
>> is to delete the .sieve-bin/activesql.svbin. If I remove
>> ";bindir=~/.sieve-bin" works fine.
>>
>> This is a cache issue and can be fixed via setting, is an issue or is
>> a "feature" :-) ?
> The wiki states the following:
>
> The second query is only necessary when no compiled binary is available
> or when the script has changed and needs to be recompiled. The data ID
> is used to detect changes in the dict's underlying database.
Thanks now it's all clear :-)

-- 
Alessio Cecchi
Postmaster @ http://www.qboxmail.it
https://www.linkedin.com/in/alessice



More information about the dovecot mailing list