[Dovecot] how to setup different quota for multiple namespaces

Andreas Oster aoster at novanetwork.de
Thu Jan 10 11:59:55 EET 2013


Am 09.01.2013 09:46, schrieb Andreas Oster:
> Hello all,
> 
> I am using dovecot for some time now but always had very basic
> configurations. I recently have configured a new, additional namespace
> in order to move archived mails (Thunderbird Archives) to another
> storage system.
> 
> namespace {
>   type = private
>   separator = .
>   prefix = Archives.
>   location = maildir:/var/vmail/archive/%Ln/Maildir
>   subscriptions = yes
>   list = children
>   inbox = no
> }
> 
> This works well but unfortunately I cannot find a solution to either
> ignore this new namespace from quota computation or add a separate quota
> value for it.
> 
> I have integrated user authentication with LDAP and fetch some user
> attributes from LDAP entries:
> 
> user_attrs =
> =home=/var/vmail/%Ln/Maildir,=mail=maildir:/var/vmail/%Ln/Maildir/,otherPager=quota_rule=*:storage=%$
> 
> 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.
> 
> 
> Does anyone have an idea how to fix this ?
> 
> Thank you for your kind help
> 
> Andreas
> 
> 
Hello all,

I have just realized, that my quota config actually works when using the
"ignore" directive, but I am unable to set a separate quota (for example
10G) for the Archives. namespace.

I have tried with:

quota_rule2 = ns=Archives.:storage=10G

but this raises an error message in the logfile:

Jan  9 11:30:01 mail01 dovecot: imap: Debug: Added userdb setting:
plugin/quota_rule=*:storage=3G
Jan  9 11:30:01 mail01 dovecot: imap: Debug: Effective uid=150, gid=8,
home=/var/vmail/novanetwork.loc/testuser/Maildir
Jan  9 11:30:01 mail01 dovecot: imap: Debug: Quota root: name=User quota
backend=maildir args=ns=
Jan  9 11:30:01 mail01 dovecot: imap: Debug: Quota rule: root=User quota
mailbox=* bytes=3221225472 messages=0
Jan  9 11:30:01 mail01 dovecot: imap: Warning: quota root User quota
rule ns=Archives.:storage=10G: obsolete configuration for rule
'storage=10G' should be changed to 'storage=+10G'
Jan  9 11:30:01 mail01 dovecot: imap: Debug: Quota rule: root=User quota
mailbox=ns=Archives. bytes=+10737418240 messages=0
Jan  9 11:30:01 mail01 dovecot: imap: Debug: Quota root: name=Archive
quota backend=maildir args=ns=Archives.


If I add the '+' the error message will not come up again, but when
checkinig the quota value for the folders under the Archives. namespace
I still get the quota size for the Inbox namespace.

Thank you for your kind help

best regards

Andreas



More information about the dovecot mailing list