Andreas Oster
2013-Jan-09 08:46 UTC
[Dovecot] how to setup different quota for multiple namespaces
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
Andreas Oster
2013-Jan-10 09:59 UTC
[Dovecot] how to setup different quota for multiple namespaces
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=nsJan 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
Steffen Kaiser
2013-Jan-10 14:30 UTC
[Dovecot] how to setup different quota for multiple namespaces
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 9 Jan 2013, Andreas Oster wrote:> namespace { > type = private > 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. Regards, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUO7QbWoxLS8a3A9mAQI2LggAqypoAGwF7uq/QQdjqShUAnH8cTgWLeVH Nvg0ZJ+lASbGXS8EO98Vy9Ug0aaW1pi0kkHyO+gCSU8ClGIBDpWl4ZYxYQnwXQMX wjyt80Cenhi/2yluJV2l4vLWxft7KqUfBtBcH8F5I1fFQdUVD7tegnTbDbNuUd1L ZHnJQotWQu1GQYtuU+C5/VGh/xnTANKt7+PFUYE7kKnp6kPPnQBEYmoPpPGiHeze b8weSeMPDvWgnmH+7f8dZk6qv7pTeC04ReWuTrzHqLtnsxfgGaNYRq9piTCFLFGl +bzcDeReS70FgdjTEW4kLUxoSVMcZUeRUkGVsRy0lznfdcnaExxJ/A==26K2 -----END PGP SIGNATURE-----
Andreas Oster
2013-Jan-11 07:36 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 10.01.2013 15:30, schrieb Steffen Kaiser:> On Wed, 9 Jan 2013, Andreas Oster wrote: > >> namespace { >> type = private >> 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. > > Regards, > > -- Steffen Kaiser >Hello Steffen, thank you for the information. I will try to setup the quota rule the way you have proposed. I will report the results when I have time to test it. Thank you for your fast response. best regards Andreas
Andreas Oster
2013-Jan-11 10:10 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 10.01.2013 15:30, schrieb Steffen Kaiser:> On Wed, 9 Jan 2013, Andreas Oster wrote: > >> namespace { >> type = private >> 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. > > Regards, > > -- Steffen Kaiser >Hello Steffen, 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. best regards Andreas
Andreas Oster
2013-Jan-14 14:55 UTC
[Dovecot] how to setup different quota for multiple namespaces
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 > >Hi all, I have changed my quota config in every way that came to my mind but did not manage to get the result I want to achieve. I would like to have LDAP provided quota for INBOX ( this part is working) and a completely separate 10G quota for the Archives namespace. Is it actually possible to have separated quotas for multiple private namespaces with dovecot (2.1.7)? Thank you for your kind help. best regards
Andreas Oster
2013-Jan-15 07:59 UTC
[Dovecot] how to setup different quota for multiple namespaces
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 > >Hi all, does nobody have a similar setup ? Is this the wrong way to implement this ? Thanks best regards Andreas
Steffen Kaiser
2013-Jan-16 08:55 UTC
[Dovecot] how to setup different quota for multiple namespaces
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 >>> 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. Kind regards, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPZrD13r2wJMiz2NAQIibgf9Gdf9esxTnKRuA1cDV9fS3leQep06U6Lt C70Zbqasi0E8ePow3qHZlTljJZm1xJGvRhBw6C6KD6FM6s48erjBL2yNTT37RHoJ F1vJqXyZ23MYOOf5fBRQ2HkgtlBVYnivG3Gtqliz0NBIABZzR9IE31rham1PmUDa Dgi2EBUepJyVU7WmK5ZPjaXPMvguicboSA10VMh/RQkd+1c1dLjNisVSzKZ+h2/6 lIlXLHb0uyPIecbni6j/bmkkp3Ps3lTQZ7mfoFGTp7WtVCIdJBFpGkPMXm6R3WAg QQoIqOyDiAIZwShWMx5vfVE9fcmMDbulvpXW83laAXARwuIVAC7+jQ==lVxH -----END PGP SIGNATURE-----
Andreas Oster
2013-Jan-16 09:29 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 16.01.2013 09:55, schrieb Steffen Kaiser:> 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 >>>> 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. > > Kind regards, > > -- Steffen Kaiser >Hello Steffen, thank you for creating a test setup. I will try to implement it the way you did it, but I will stay with maildir. Meanwhile I have recognized another issue, this time with our webmail system (roundcube). It seems that it is not able to handle multiple namespaces so I might need to stay with the single private namespance setup. Thank you very much for your kind help. best regards Andreas
Robert Schetterer
2013-Jan-16 09:56 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 16.01.2013 10:29, schrieb Andreas Oster:> Am 16.01.2013 09:55, schrieb Steffen Kaiser: >> 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 >>>>> 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. >> >> Kind regards, >> >> -- Steffen Kaiser >> > > Hello Steffen, > > thank you for creating a test setup. I will try to implement it the way > you did it, but I will stay with maildir. > > Meanwhile I have recognized another issue, this time with our webmail > system (roundcube). It seems that it is not able to handle multiple > namespaces so I might need to stay with the single private namespance setup. > > Thank you very much for your kind help. > > best regards > > Andreas > > >try upgrade roundcube with reconfigure some issues with namespace were solved http://trac.roundcube.net/ticket/1486796 http://trac.roundcube.net/attachment/ticket/1486796/imap_namespace.patch however i am not sure if that fixes your special problem Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstra?e 15, 81669 M?nchen Sitz der Gesellschaft: M?nchen, Amtsgericht M?nchen: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Steffen Kaiser
2013-Jan-17 14:17 UTC
[Dovecot] how to setup different quota for multiple namespaces
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 = privateI 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPgICV3r2wJMiz2NAQINFQf8CBRMs9ogiVutYJQr/pdlKUKLItDG62fx hylc3s7mJ9odm0B3EMi5vztNv8wUlwMJf8RZpxLIFbXzoCMq6QzfAaFt0EsHHe/T 2HyM//pfhoFuc2qrBvUEsJlxQEGc7CLqhCGlEIgOXFBrn9zUmuzZUtKLLWsDcNhe Vs0IQRsM1vdBGPEGNO/CKVkmLmbKAs2dQKMuXmsbpT/k4VCvzI7zrOz/D0gsgczz w5fQCgVNGu1rHdWjrSaya6Y3ErE6mVZsUkNmTQ9cP8WHfKuRHkkkUhaeXxLv08S7 pUnFcJUp7I31VPVyyxCNVv99sssKVKdxCxnSe6VGADalwW2f8nHV2Q==S+t+ -----END PGP SIGNATURE-----
Andreas Oster
2013-Jan-17 14:58 UTC
[Dovecot] how to setup different quota for multiple namespaces
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
Timo Sirainen
2013-Jan-22 11:54 UTC
[Dovecot] how to setup different quota for multiple namespaces
On 17.1.2013, at 16.58, Andreas Oster <aoster at novanetwork.de> wrote:>> 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.It should work for all namespaces.>>> plugin { >>> quota = dict:User quota::proxy::quota >>> quota2 = dict:Archive quota:ns=Archive.:proxy::quotaquota = dict:User quota::ns=:proxy::quota quota2 = dict:Archive quota::ns=Archive.:proxy::quota That should work? Worked at least in latest v2.1 hg.
Andreas Oster
2013-Jan-22 13:06 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 22.01.2013 12:54, schrieb Timo Sirainen:> On 17.1.2013, at 16.58, Andreas Oster <aoster at novanetwork.de> wrote: > >>> 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. > > It should work for all namespaces. > >>>> plugin { >>>> quota = dict:User quota::proxy::quota >>>> quota2 = dict:Archive quota:ns=Archive.:proxy::quota > > quota = dict:User quota::ns=:proxy::quota > quota2 = dict:Archive quota::ns=Archive.:proxy::quota > > That should work? Worked at least in latest v2.1 hg. > >Hello Timo, thank you for your reply. I am using dovecot 2.1.7 (Ubuntu 12.10) and have tried to configure a separate quote root for a second private namespace without any success. The only working option is to ignore/disable quota for the second namespace: } namespace inbox { hidden = no ignore_on_failure = no inbox = yes list = yes location prefix separator = / subscriptions = yes type = private } namespace { hidden = no ignore_on_failure = no inbox = no list = children location = maildir:/var/vmail/archives/%n/Maildir prefix = Archives/ separator = / subscriptions = yes type = private } plugin { quota = maildir:User quota:ns quota2 = maildir:Archives quota:ns=Archives/ quota_rule = *:storage=1G quota_rule2 = Trash:storage=+200M quota_rule3 = ns=Archives/:ignore } If I try to enter something like: quota_rule3 = ns=Archives/:storage=10G I will get an error message saying that this is deprecated and needs to be replaced by "+10G". best regards Andreas
Andreas Oster
2013-Jan-23 06:25 UTC
[Dovecot] how to setup different quota for multiple namespaces
Am 22.01.2013 14:06, schrieb Andreas Oster:> Am 22.01.2013 12:54, schrieb Timo Sirainen: >> On 17.1.2013, at 16.58, Andreas Oster <aoster at novanetwork.de> wrote: >> >>>> 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. >> >> It should work for all namespaces. >> >>>>> plugin { >>>>> quota = dict:User quota::proxy::quota >>>>> quota2 = dict:Archive quota:ns=Archive.:proxy::quota >> >> quota = dict:User quota::ns=:proxy::quota >> quota2 = dict:Archive quota::ns=Archive.:proxy::quota >> >> That should work? Worked at least in latest v2.1 hg. >> >> > Hello Timo, > > thank you for your reply. I am using dovecot 2.1.7 (Ubuntu 12.10) and > have tried to configure a separate quote root for a second private > namespace without any success. The only working option is to > ignore/disable quota for the second namespace: > > > } > namespace inbox { > hidden = no > ignore_on_failure = no > inbox = yes > list = yes > location > prefix > separator = / > subscriptions = yes > type = private > } > > namespace { > hidden = no > ignore_on_failure = no > inbox = no > list = children > location = maildir:/var/vmail/archives/%n/Maildir > prefix = Archives/ > separator = / > subscriptions = yes > type = private > } > > > > plugin { > quota = maildir:User quota:ns> quota2 = maildir:Archives quota:ns=Archives/ > quota_rule = *:storage=1G > quota_rule2 = Trash:storage=+200M > quota_rule3 = ns=Archives/:ignore > } > > > If I try to enter something like: > > quota_rule3 = ns=Archives/:storage=10G > > I will get an error message saying that this is deprecated and needs to > be replaced by "+10G". > > best regards > > Andreas >Hello Timo, I have created some DEB packages for Ubuntu with dovecot version 2.1.13 but this version shows the same behavior. Do I have to configure quota like Steffen did with: quota2 = dict:Archive quota::ns=Archive/:proxy::quota Thank you for your kind help. best regards Andreas