[Dovecot] how to setup different quota for multiple namespaces

Andreas Oster aoster at novanetwork.de
Thu Jan 17 16:58:40 EET 2013


Am 17.01.2013 15:17, schrieb Steffen Kaiser:
> On Wed, 16 Jan 2013, Steffen Kaiser wrote:
> 
>> On Fri, 11 Jan 2013, Andreas Oster wrote:
> 
>>> Am 10.01.2013 15:30, schrieb Steffen Kaiser:
>>>> On Wed, 9 Jan 2013, Andreas Oster wrote:
>>>>
>>>>> namespace {
>>>>>  type = private
> 
> I just saw on important difference in the doc and this configuration:
> 
> see
> http://wiki2.dovecot.org/Quota/Configuration#Quota_for_public_namespaces
> 
> the ns=name syntax is for _public_ namespaces only. I just tested it
> with this setup and every message is counted for both namespaces, if
> delivered into INBOX or a mailbox of the Archive namespace.
> 
>>>>>  separator = .
>>>>>  prefix = Archives.
>>>>>  location = maildir:/var/vmail/archive/%Ln/Maildir
>>>>>  subscriptions = yes
>>>>>  list = children
>>>>>  inbox = no
>>>>> }
>>>>
>>>>> I configured the quota plugin in the following way:
>>>>
>>>>> plugin {
>>>>>        quota = maildir:User quota:ns=
>>>>>        quota2 = maildir:Archive quota:ns=Archives.
>>>>>        quota_rule = *:storage=1G
>>>>>        quota_rule2 = ns=Archives.:ignore
>>>>> }
>>>>
>>>>> unfortunately this does not give the desired result. Folders under the
>>>>> Archives namespace use the same quota as INBOX.
>>>>
>>>> If I understand the Wiki correctly, you need to write:
>>>>
>>>>         quota2_rule = *:storage=10G
>>>>
>>>> The "quota2"_rule# settings apply to the "quota2" root by
>>>> namespace. Whereas the "quota"_rule# settings apply to the default, the
>>>> first quota root.
>>>
>>> unfortunately this does not work. when I configure it the way you have
>>> proposed the 10G quote will be assigned to the base namespace (INBOX)
>>> the Archives namespace has no quota assigned.
> 
>> I tried this setup:
> 
>> namespace {
>>  type = private
>>  separator = .
>>  prefix = Archive.
>>  location = mdbox:/home/%u/archive
>>  #subscriptions = no
>>  #list = children
>> }
> 
>> plugin {
>>  quota = dict:User quota::proxy::quota
>>  quota2 = dict:Archive quota:ns=Archive.:proxy::quota
>>  quota2_rule = *:storage=1048576
>> }
> 
>> telnet localhost 143
>> 1 login .. ..
>> 2 list "" *
>> * LIST (\HasNoChildren \Sent) "." "Sent"
>> * LIST (\HasNoChildren \Trash) "." "Trash"
>> * LIST (\HasNoChildren \Junk) "." "Junk"
>> * LIST (\HasNoChildren \Drafts) "." "Drafts"
>> * LIST (\HasNoChildren) "." "INBOX"
>> * LIST (\Noselect \HasChildren) "." "Archive"
>> * LIST (\HasNoChildren) "." "Archive.Test"
>> 2 OK List completed.
>> 2 getquotaroot ""
>> * QUOTAROOT "" "User quota" "Archive quota"
>> * QUOTA "User quota" (STORAGE 259 7540259)
>> * QUOTA "Archive quota" (STORAGE 2109 1048576)
>> 2 OK Getquotaroot completed.
> 
>> So the configuration is running in Dovecot v2.1.13. The value of "User
>> quota" comes from LDAP. What I did not tested was, if the quota is
>> actually calculated and tracked in the database.
> 
> -- Steffen Kaiser
> 

Hello Steffen,

thanks again for testing. I also did some tests but had no luck so far.
I guess it is not possible to have different quotas for multiple private
namespaces.

best regards

Andreas



More information about the dovecot mailing list