I'll answer my own question :
Adding quota information in user_query like this :
user_query = SELECT \
maildir as mail, \
homedir as home, \
uid, \
gid, \
---> CONCAT('*:bytes=', quota) AS quota_rule \
FROM mailbox WHERE username = '%u'
fixed my problem.
Regards,
C?dric
Le 12/10/2016 ? 08:53, C?dric ML a ?crit :> Hello,
>
> I'm trying to make quota work on my dovecot server.
> I'm using prefetch userdb (source :
> http://wiki2.dovecot.org/UserDatabase/Prefetch) with a database
> located on a remote host :
>
> passdb {
> driver = sql
> args = /etc/dovecot/dovecot-sql.conf.ext
> }
>
> userdb {
> driver = prefetch
> }
>
> userdb {
> driver = sql
> args = /etc/dovecot/dovecot-sql.conf.ext
> }
>
>
> With password_query containing (source :
> http://wiki2.dovecot.org/Quota/Configuration) :
> password_query = SELECT \
> username AS user, \
> password, \
> homedir AS userdb_home, \
> maildir AS userdb_mail, \
> uid AS userdb_uid, \
> gid AS userdb_gid, \
> CONCAT('*:bytes=', quota) AS userdb_quota_rule \
> FROM mailbox \
> WHERE username = '%u'
>
>
>
> When I change the quota value in DB, it's not reflected to maildirsize
> file of the user.
> If I delete maildirsize file, it's re-created but not with the quota
> value which is set in the DB.
>
> Questions : how is this maildirsize file created ? how is it updated ?
> is there a way to make maildir++ quota work with dovecot using
> prefetch userDB ? Or do I have to use dict quotas ?
>
> Many thanks for your help.
> Regards,
> C?dric