I found what causes quota not being working at all - namespace. Whenever I declare a basic namespace :
namespace { type = public prefix = INBOX. separator = . inbox = yes } or even namespace { type = public inbox = yes } Quota gets broken: # doveadm quota recalc -u administrator; doveadm quota get -u administrator Quota name Type Value Limit % User quota STORAGE 0 100000 0 User quota MESSAGE 0 - 0 When I get rid of any namespace declaration, quota gets work: # doveadm quota recalc -u administrator; doveadm quota get -u administrator Quota name Type Value Limit % User quota STORAGE 19922 100000 19 User quota MESSAGE 2 - 0 Quota settings are simple: plugin { quota = maildir quota_rule = *:bytes=100000k } 'count' quota engine works too as well. But I need to declare and set up my own namespace (Spam and Sent folders, subscriptions and autoexpunge stuff). Any suggestions how to set quota within a specific namespace ? 2017-09-06 21:24 GMT+05:00 Вадим Бажов <mas...@remort.net>: > 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 Вадим Бажов <mas...@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+li...@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