On 23 Nov 2016, at 0.49, Mark Moseley <moseleymark at gmail.com> wrote:> > If I move messages between namespaces, it appears to ignore the quotas I've > set on them. A *copy* will trigger the quota error. But a *move* just > happily piles on to the overquota namespace. Is that normal?Probably needs a bit more thinking, but I guess the attached patch would help. -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: application/octet-stream Size: 1775 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20161124/e9885269/attachment.obj> -------------- next part --------------
On Wed, Nov 23, 2016 at 6:05 PM, Timo Sirainen <tss at iki.fi> wrote:> On 23 Nov 2016, at 0.49, Mark Moseley <moseleymark at gmail.com> wrote: > > > > If I move messages between namespaces, it appears to ignore the quotas > I've > > set on them. A *copy* will trigger the quota error. But a *move* just > > happily piles on to the overquota namespace. Is that normal? > > Probably needs a bit more thinking, but I guess the attached patch would > help. > >I appreciate the patch! Esp on a Weds night. I applied and rerolled dovecot, but I can still move messages into the over-quota namespace. I threw some i_debug's into quota_roots_equal() (and one right at the top), but I don't ever see them in the debug logs. But both "ctx->moving" and "src_box == NULL" are true, so it never calls quota_roots_equal anyway in that patched 'if' clause in quota_check. I threw the following into quota_check and it printed to the debug log for both if's: if (ctx->moving ) i_debug("quota: quota_check: YES to ctx->moving" ); if (src_box == NULL) i_debug("quota: quota_check: YES to src_box =NULL" ); Out of curiosity, in the Quota wiki page, it mentions that 'in theory there could be e.g. "user quota" and "domain quota" roots'. That's also super interesting to me. Does anyone have any experience with that? I.e. any gotchas?
On 24 Nov 2016, at 9.33, Mark Moseley <moseleymark at gmail.com> wrote:> > On Wed, Nov 23, 2016 at 6:05 PM, Timo Sirainen <tss at iki.fi> wrote: > >> On 23 Nov 2016, at 0.49, Mark Moseley <moseleymark at gmail.com> wrote: >>> >>> If I move messages between namespaces, it appears to ignore the quotas >> I've >>> set on them. A *copy* will trigger the quota error. But a *move* just >>> happily piles on to the overquota namespace. Is that normal? >> >> Probably needs a bit more thinking, but I guess the attached patch would >> help. >> >> > I appreciate the patch! Esp on a Weds night. I applied and rerolled > dovecot, but I can still move messages into the over-quota namespace.How about this updated patch?> Out of curiosity, in the Quota wiki page, it mentions that 'in theory there > could be e.g. "user quota" and "domain quota" roots'. That's also super > interesting to me. Does anyone have any experience with that? I.e. any > gotchas?There's no automatic quota recalculation for domain quotas, because it would have to somehow sum up all the users' quotas. Also I think that it still does do the automatic quota recalculation if it gets into a situation where it realizes that quotas are wrong, but it'll then just use the single user's quota as the entire domain quota. So maybe it would work if you externally sum up all the users' quotas and update it to the domain quota in cronjob, e.g. once per hour. I guess it would be also nice if the internal quota recalculation could be disabled and maybe execute an external script to do it (similar to quota-warnings). -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: application/octet-stream Size: 4104 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20161124/68e5ba70/attachment.obj> -------------- next part --------------
Seemingly Similar Threads
- Implementing secondary quota w/ "Archive" namespace
- Implementing secondary quota w/ "Archive" namespace
- Implementing secondary quota w/ "Archive" namespace
- Implementing secondary quota w/ "Archive" namespace
- Implementing secondary quota w/ "Archive" namespace