[Dovecot] Question regarding quotas (is this a bug or intended behavior) ?
Hi,
I was wondering if this is a normal behavior (test was made using Dovecot v2.2.9).
In my config, quotas are configured as follows: plugin { quota = dict:Userquota::file:%h/dovecot-quota quota_rule = *:storage=1G quota_rule2 = Trash:ignore }
# doveadm mailbox status -u my_user "messages vsize" '*' Trash messages=4997 vsize=229535631 Drafts messages=0 vsize=0 Sent messages=0 vsize=0 Junk messages=0 vsize=0 INBOX messages=0 vsize=0
# doveadm -f flow quota get -u my_user Quota name=Userquota Type=STORAGE Value=0 Limit=1048576 %=0 Quota name=Userquota Type=MESSAGE Value=0 Limit=- %=0
The 4997 mails in the Trash mailbox are ignored as desired, but now, if I have the following case:
# doveadm mailbox status -u my_user "messages vsize" '*' Trash messages=0 vsize=0 Trash/TEST messages=4997 vsize=229535631 Drafts messages=0 vsize=0 Sent messages=0 vsize=0 Junk messages=0 vsize=0 INBOX messages=0 vsize=0
(As you can see mails were moved to a Trash/TEST mailbox)
# doveadm -f flow quota get -u my_user Quota name=Userquota Type=STORAGE Value=220918 Limit=1048576 %=21 Quota name=Userquota Type=MESSAGE Value=4997 Limit=- %=0
I tried to add the following quota_rule: quota_rule3 = Trash/*:ignore
But this doesn't fix anything.
Do you have any idea about why this is not working ?
Thanks, Regards, Gilles.
On 4.12.2013, at 19.02, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
I tried to add the following quota_rule: quota_rule3 = Trash/*:ignore
But this doesn't fix anything.
Do you have any idea about why this is not working ?
It wasn’t implemented. But I guess it’s useful and there’s no harm in adding it, so: http://hg.dovecot.org/dovecot-2.2/rev/78b34eb7c6c5
On 08/12/2013 22:05, Timo Sirainen wrote:
On 4.12.2013, at 19.02, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
I tried to add the following quota_rule: quota_rule3 = Trash/*:ignore
But this doesn't fix anything.
Do you have any idea about why this is not working ?
It wasn’t implemented. But I guess it’s useful and there’s no harm in adding it, so: http://hg.dovecot.org/dovecot-2.2/rev/78b34eb7c6c5
Looks like something is broken now :-/
Config: plugin { quota = dict:Userquota::file:%h/dovecot-quota quota_rule = *:storage=1G }
# doveadm mailbox status -u myuser "messages vsize" INBOX INBOX messages=765 vsize=151182915
# doveadm -f flow quota get -u myuser Quota name=Userquota Type=STORAGE Value=145564 Limit=1048576 %=13 Quota name=Userquota Type=MESSAGE Value=765 Limit=- %=0
Config change only: plugin { quota = dict:Userquota::file:%h/dovecot-quota quota_rule = *:storage=1G quota_rule2 = Trash:ignore }
# doveadm mailbox status -u myuser "messages vsize" INBOX INBOX messages=765 vsize=151182915
# doveadm -f flow quota get -u myuser Quota name=Userquota Type=STORAGE Value=145564 Limit=- %=0 Quota name=Userquota Type=MESSAGE Value=765 Limit=- %=0
Regards, Gilles.
On 9.12.2013, at 14.08, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
On 08/12/2013 22:05, Timo Sirainen wrote:
On 4.12.2013, at 19.02, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
I tried to add the following quota_rule: quota_rule3 = Trash/*:ignore
But this doesn't fix anything.
Do you have any idea about why this is not working ?
It wasn’t implemented. But I guess it’s useful and there’s no harm in adding it, so: http://hg.dovecot.org/dovecot-2.2/rev/78b34eb7c6c5
Looks like something is broken now :-/
Right, it actually came to my mind when I went to sleep that I probably messed up this: http://hg.dovecot.org/dovecot-2.2/rev/feb656fd212e
On 09/12/2013 14:42, Timo Sirainen wrote:
On 9.12.2013, at 14.08, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
On 08/12/2013 22:05, Timo Sirainen wrote:
On 4.12.2013, at 19.02, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
I tried to add the following quota_rule: quota_rule3 = Trash/*:ignore
But this doesn't fix anything.
Do you have any idea about why this is not working ?
It wasn’t implemented. But I guess it’s useful and there’s no harm in adding it, so: http://hg.dovecot.org/dovecot-2.2/rev/78b34eb7c6c5
Looks like something is broken now :-/
Right, it actually came to my mind when I went to sleep that I probably messed up this: http://hg.dovecot.org/dovecot-2.2/rev/feb656fd212e
That's better, thanks. Although there is still a problem.
# doveadm mailbox status -u myuser "messages vsize" '*' TEST messages=765 vsize=151182915 Junk messages=0 vsize=0 Trash messages=0 vsize=0 Drafts messages=0 vsize=0 Sent messages=0 vsize=0 INBOX messages=0 vsize=0
# doveadm -f flow quota get -u myuser Quota name=Userquota Type=STORAGE Value=145564 Limit=1048576 %=13 Quota name=Userquota Type=MESSAGE Value=765 Limit=- %=0
If now I just drag n' drop the "TEST" mailbox to the Trash, the log says "Mailbox renamed: TEST -> Trash/TEST"
But...
This is only taken into account if I issue a "quota recalc" command.
# doveadm -f flow quota get -u myuser Quota name=Userquota Type=STORAGE Value=145564 Limit=1048576 %=13 Quota name=Userquota Type=MESSAGE Value=765 Limit=- %=0
# doveadm quota recalc -u myuser
# doveadm -f flow quota get -u myuser Quota name=Userquota Type=STORAGE Value=0 Limit=1048576 %=0 Quota name=Userquota Type=MESSAGE Value=0 Limit=- %=0
If this is not easy to fix for you, I guess I'll have to recalc the quotas in a cron job!
Thanks, Gilles.
On 9.12.2013, at 16.14, Gilles Chauvin <gilles.chauvin@univ-rouen.fr> wrote:
That's better, thanks. Although there is still a problem.
If now I just drag n' drop the "TEST" mailbox to the Trash, the log says "Mailbox renamed: TEST -> Trash/TEST"
But...
This is only taken into account if I issue a "quota recalc" command.
If this is not easy to fix for you, I guess I'll have to recalc the quotas in a cron job!
Oh. Hmm. Yeah, this isn’t very easy to fix. Also it only affects the “ignore” quota, which is quite a special case. A lot of installations are rather just assigning larger quota limit to the Trash folder(s) so the user is able to then finish their deletion. For that use case the RENAME isn’t a problem..
participants (2)
-
Gilles Chauvin
-
Timo Sirainen