[Dovecot] Quota ignore subfolders

Timo Sirainen tss at iki.fi
Tue Jan 4 13:39:58 EET 2011


On Wed, 2010-12-15 at 12:47 +0100, Héctor Moreno Blanco wrote:

> We have dovecot 2.0.8 in our servers with Scientific Linux SL release 5.2 (Boron).
> We want to ignore a mailbox and its child mailboxes.
> 
> A few weeks ago Timo told me to do this in dovecot.conf, create a new namespace which will be the quotaless namespace and edit the quota:

Well, I don't know what you're doing wrong, but it works with me. Here's
an easy way to reproduce my test. Maybe it'll give you some ideas of
what could be going wrong:

1) Save a slightly modified version of your config:

cat > ~/dovecot.conf <<EOF
mail_plugins = quota
mail_location = /tmp/Maildir

namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
namespace {
  location = maildir:/tmp/Maildir/carpeta1
  prefix = carpeta1.
  separator = .
  type = private
}

plugin {
  quota = maildir:carpeta1:ns=INBOX.
  quota_warning = storage=75%% /usr/local/dovecot/bin/quota-warning.sh 75
  quota_warning2 = storage=90%% /usr/local/dovecot/bin/quota-warning.sh 90
}
EOF

2) Create test mails to /tmp/Maildir

mkdir -p /tmp/Maildir/cur
dd if=/dev/urandom of=/tmp/Maildir/cur/mail-in-quota bs=1024 count=1024
mkdir -p /tmp/Maildir/carpeta1/cur
dd if=/dev/urandom of=/tmp/Maildir/carpeta1/cur/mail-without-quota bs=1024 count=2048

3) Recalculate the quota with doveadm and ask for it:

doveadm -c ~/dovecot.conf quota recalc       
doveadm -c ~/dovecot.conf quota get   

The result is as expected, the 1 MB mail shows up while the 2 MB mail doesn't:

Quota name                         Type    Value Limit %
carpeta1                           STORAGE  1024     - 0
carpeta1                           MESSAGE     1     - 0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20110104/ce2ccfe2/attachment.bin 


More information about the dovecot mailing list