[Dovecot] domain quota in sql

Timo Sirainen tss at iki.fi
Wed Feb 15 03:55:57 EET 2012


On 15.2.2012, at 3.54, Timo Sirainen wrote:

> Domain-quota support in Dovecot is only partial. Recalculating domain quota would require more code. Last time when someone asked about this I wasn't even sure how it could be implemented, but nowadays it actually would be possible to do with:

Oh, and you could actually already do this with a doveadm script:

> - set domain's quota to 0

update .. | mysql

> - iterate *@domain users via userdb

doveadm user '*@domain'

> - for each user get the user's quota and add it to domain quota

doveadm quota get -u $user | some grep+sed magic | mysql

Of course it would be nice if Dovecot internally supported this.


More information about the dovecot mailing list