can't get quota working. I use static userdb driver.

Вадим Бажов master at remort.net
Wed Sep 6 19:24:56 EEST 2017


Quotas not being counted with 'passwd-file' driver too. Thunderbird
still doesn't show quota bar.
It is mentioned to run passdb with '-d' parameter if quotas aren't
working. Can you explain how to set it up. How to run passdb with '-d'
parameter ? Any configuration file snippet ?

2017-09-06 21:20 GMT+05:00 Вадим Бажов <master at remort.net>:
> Just tried 'count', 'fs' and 'dirsize' quota ackends. All the same.
>
> # doveadm quota recalc
> # doveadm quota get -u vadim
> Quota name Type    Value Limit
>
>         %
> User quota STORAGE     0 10240
>
>         0
> User quota MESSAGE     0     -
>
>         0
> # doveadm quota get
> Quota name Type    Value Limit
>
>         %
> User quota STORAGE     0 10240
>
>         0
> User quota MESSAGE     0     -
>
> It looks like quota_rule is interpreted but quota backend doesn't work
> (cant count current quota state).
>
> I deleted all the mailboxes, then I divided CONTROL an INDEX dirs
> apart from mailbox dir itself:
> maildir:/var/spool/mail/%u:INDEX=/tmp/no-quotas/index/%u:CONTROL=/tmp/no-quotas/control/%u
> Boxes were created with dovecot files for them under /tmp/no-quotas as
> well, but no changes. quota value is always zero.
> May be I should try MDBOX with all these quota backends, but, anyway,
> I cant migrate to MDBOX yet, so it's not my choice.
>
> Any suggestions ? Does anyone has a working maldir quota installation
> all around ?
> Dovecot version is 2.2.27 (c0f36b0).
>
> Some other questions:
> 1. Documentation says that quotas can work improperly if static userdb
> driver is used.  I use static driver. Is it really a problem ? I tried
> to return user quotas from my bash-script, it passes from bash to
> dovecot during lmtp and auth processes succesfully. But no difference
> with calculating quotas. Can I use something different from static
> driver for userdb if I use external bash script for auth and lmtp ? (I
> will try to change the driver...)
> 2. It said that maildir quota backend count quotas using 'maildirsize'
> files. I dont have such files inside box dirs. What should I tune in
> order to create them by dovecot ?
> 3. Found this in docs: "Dovecot can't currently handle not being able
> to write the control files, so it will cause problems with filesystem
> quota. To avoid problems with this, you should place control files
> into a partition where quota isn't checked. You can specify this by
> adding :CONTROL=<path> to mail_location, for example:" - i tried to
> put CONTROL and INDEX files in separate dir, but in the same dis
> partition. Should I really change the disk partition ? What
> 'filesystem quota' means here ? I dont use any disk quotas in my
> system (centos 6.9).
>
> 2017-09-06 15:55 GMT+05:00 Alex JOST <jost+lists at dimejo.at>:
>> Am 06.09.2017 um 12:17 schrieb Вадим Бажов:
>>>
>>> Thank you for your answers.
>>> I fixed config to:
>>>
>>> plugin {
>>>    sieve_default = /mnt/rw_disc/dovecot/sieve/default.sieve
>>>    sieve_global = /mnt/rw_disc/dovecot/sieve/
>>>
>>>    quota = maildir:User
>>>    quota_rule = *:storage=10M
>>> #  quota_rule2 = INBOX.Trash:storage=+10%%
>>>    quota_max_mail_size = 3M
>>>    quota_exceeded_message = "552 5.2.2 Mailbox is full"
>>> }
>>
>>
>> Have you tried using a different backend (e.g. dict & flat file)?
>>
>>
>>> The mail_location is actually maildir:/var/spool/mail/%u, mdbox was a
>>> misspelling (i tried migration from maildir to mdbox before).
>>
>>
>> I'm wondering if this might be caused by using the same directory for home
>> and mail?
>>
>> --
>> Alex JOST


More information about the dovecot mailing list