[Dovecot] how to make quota per user ??

Manuel Delgado manuel.delgado at ucr.ac.cr
Tue Nov 12 17:55:16 EET 2013


On Tue, Nov 12, 2013 at 9:00 AM, Andreas Meyer <anmeyer at anup.de> wrote:

> ihab <ihab_mishriki at hotmail.com> wrote:
>
> > I use dovecot version 1.2.15 and i put quota for all users , now i want
> to
>
> upgrade to at least 2.1.17, it's a painless process.
>
> > give more size for some emails , i already added the  quota to user
> database
> > , and i added the queries from http://wiki.dovecot.org/Quota/1.1
> > MySQL:
> > user_query = select uid, gid, home, \
> >   concat('*:bytes=', quota_bytes) as quota_rule \
> >   from users where userid = '%u'
>
> We use with v 2.1.17
> user_query = SELECT maildir, uid, gid, concat('*:storage=', quota) AS
> quota_rule, concat('Trash:storage=+', quota_trash) AS quota_rule2 FROM
> mailbox WHERE username = '%u'
>
> >
> > # MySQL with userdb prefetch: Remember to prefix quota_rule with userdb_
> > # (just like all other userdb extra fields):
> > password_query = select userid as user, password, \
> >   uid as userdb_uid, gid as userdb_gid, \
> >   concat('*:bytes=', quota_bytes) as userdb_quota_rule \
> >   from users where userid = '%u'
>
>   Andreas
>

We use it with dovecot 2.1.7 too but we have 2 diferente namespaces so
rules looks like:

user_query = SELECT maildir, uid, gid, concat('*:storage=', quota) AS
quota_rule, concat('*:storage=', quota) AS quota2_rule FROM mailbox WHERE
username = '%u'

Both NS have the same quota.



~Manuel Delgado


More information about the dovecot mailing list