[Dovecot] per-user quotas

David Mehler dave.mehler at gmail.com
Tue Oct 16 09:30:34 EEST 2012


Hello,

Thanks for your replies so far. Still having issues with per-user
quotas. To my Mysql virtual_users table I've added a column quota_kb
and for a test user I've added in a value of 250000 going for a 250
megabyte quota.

I've tried various sql queries they're returning empty sets not
pulling out the information needed.

Thanks.
Dave.


On 10/12/12, Daniel Parthey <daniel.parthey at informatik.tu-chemnitz.de> wrote:
> Hi Dave,
>
> David Mehler wrote:
>> Thanks for your reply. I've written you directly as it is sounding
>> like at least for now this isn't dovecot it's well a mysql issue with
>> design. I don't have anything in my database setup with regards quota
>> I've included it below. I've got one virtual mail user called vmail
>> with UID/GID of 5000 who owns all the virtual mailboxes. If I'm
>> understanding what I've read in the link, the dovecot wiki and your
>> message since anything in a user section of Mysql will override the
>> global configuration in 90-quota.conf, that being the case I should
>> add an extra column to virtual users? Once that's done adjust the
>> userdb query for dovecot to return quota information?
>
> Yes, the quota should be stored in an additional userdb column,
> or you need at least an SQL statement which takes a username
> and returns a quota rule.
>
> Quota of 0 is interpreted as "unlimited" by dovecot.
> As already said, if the value in the quota column for the
> user is 0, your SQL statement could also return a different
> value (default quota) instead of 0 (using MySQL CASE/ELSE statement).
>
> Here is a short documentation on how it is done with Tine 2.0 Groupware:
> http://www.tine20.org/wiki/index.php/Admins/Mailserver_integration
> (it is a simple example which does not support a default quota fallback,
>  since Tine 2.0 writes the default quota as a value into the column
>  when the user is created)
>
> Regards
> Daniel
> --
> https://plus.google.com/103021802792276734820
>


More information about the dovecot mailing list