[Dovecot] quota not being calculated

Cor Bosman cor at xs4all.nl
Sat Apr 21 11:01:51 EEST 2012


> 
>> It looks like my quota isnt being calculated properly after I started setting quota to a specific folder. The quota in that folder is always starting out at 0, and only new email is being added to the quota. If I remove the maildirsize file, and recalculate, it still starts at 0. Once email arrives in the folder, it gets added to maildirsize. This is with maildirquota, in perhaps a bit of an exotic config. The idea is to set a specific quota to Spam folder, using the trash plugin to keep it at a certain size. 
> 
> I'll try later, but try if it would work with dict quota file? http://wiki2.dovecot.org/Quota/Dict
> 

This almost works, but maybe there's a small bug. Config (2.1.4)

namespace spam {
  type = private
  separator = /
  inbox = no
  prefix = Spam/
  location = maildir:%h/.Spam:INDEX=/var/spool/mail/dovecot-control/indexes/%1u/%2u/%u/.Spam:CONTROL=/var/spool/mail/dovecot-control/%1u/%2u/%u/.Spam
  subscriptions = no
  list = yes
  hidden = yes
}


plugin {
  quota = fs:User quota
  quota2 = dict:Spam Quota::ns=spam:file:%h/spam-quota
  quota2_rule = *:storage=20M
}

Now I see:

. getquotaroot "Spam"
* QUOTAROOT "Spam" "User quota" "Spam Quota"
* QUOTA "User quota" (STORAGE 10128 1228800)
* QUOTA "Spam Quota" (STORAGE 8727 20480)

The problem is that the storage calculated for the spam ns is wrong. It is less than 1MB. The 8727 seems to be the whole maildir including all folders. 

This seems to be caused by:

Apr 21 10:00:11 lmtp1 dovecot: imap(cor): Error: quota: Unknown namespace: spam

Regards,

Cor








More information about the dovecot mailing list