[Dovecot] [ rc28 ] dict{} seems to be ignored

Timo Sirainen tss at iki.fi
Mon Apr 2 17:37:38 EEST 2007


On Mon, 2007-04-02 at 16:14 +0200, Emiliano Gabrielli (aka AlberT)
wrote:
> > > CONCAT('maildir:storage=', CEIL(quota/1000)) AS userdb_quota FROM
> > > mailbox WHERE username = '_test_ at XXXXXXX.it'
> >
> > There is the "maildir". It should say "dict" there instead if you
> > want it to use dict. So change it from user_query.
> 
> dovecot: Apr 02 16:11:36 Error: IMAP(_test_ at XXXXXXX.it): dict quota: URI missing from parameters: dict:storage=10240
> 
> maybe I have totally misundestood how this plugin works ... ;-(
> 
> 
> this is the lines in my dovecot.cof:
> dict {
>   quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
> }
> plugin {
>   quota = dict:storage=20480:messages=1000 proxy::quotadict
> }

I think the misunderstandment is that plugin { quota } is completely
ignored, because it's overridden by your user_query statement.

> and here are the SQL queries in the dovecot-sql.conf:
> 
> user_query = SELECT 10000 AS uid, 10000 AS gid, '/var/vmail/domains/%d/%n' as home, 
>              'maildir:/var/vmail/domains/%d/%n' as mail, 
>              CONCAT('maildir:storage=', 
>              CEIL(quota/1000)) AS quota 
>              FROM mailbox WHERE username = '%u' AND active = '1'

So here should be:

CONCAT('dict:storage=2', ceil(quota/1000), ' proxy::quotadict') AS quota

(or quota /1024?)

> password_query = SELECT username as user, password, 
>                  '/var/vmail/domains/%d/%n' as userdb_home, 
>                  'maildir:/var/vmail/domains/%d/%n' as userdb_mail, 
>                  10000 AS userdb_uid, 10000 AS userdb_gid, 
>                  CONCAT('maildir:storage=', CEIL(quota/1000)) AS userdb_quota 
>                  FROM mailbox WHERE username = '%u'

If you want to use the userdb_* here you should also enable prefetch
userdb, otherwise they're ignored.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070402/780a085c/attachment.pgp 


More information about the dovecot mailing list