[Dovecot] Custom sql query for keeping quota with dict-sql

Marcin Mirosław marcin at mejor.pl
Thu Jun 2 17:48:11 EEST 2011


Hello!
I'd like to setup quota for for virtualusers, i'm using both maildir++
and mdbox as storage, and i'm using postgresql to keep users.
I'm keeping all users data in one table:
[...]
login text NOT NULL,
domain text,
password text,
quota_mb integer NOT NULL DEFAULT 0
[... other columns ...]

i'd like to keep present quota in such two columns:
quota_dict_bytes integer NOT NULL DEFAULT 0,
quota_dict_messages integer NOT NULL DEFAULT 0

I read wiki a little and it looks i can't define own sql queries, they
appear to be hardcoded. Am i wrong? Is it possible to write own queries
to get/set quota using such table schema? Or maybe there is diffrent way
to track quota for diffrent storages?

Regards!
Marcin


More information about the dovecot mailing list