Quota ignore subfolders

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quota ignore subfolders

hector_moreno
Hello,

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:

namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
namespace {
  location = maildir:%h/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
}

We also have passdb and userdb with ldap, with dovecot-ldap.conf:

pass_filter = (&(objectClass=qmailUser)(uid=%u)(accountActive=TRUE))
pass_attrs = uid=user,userPassword=password, mailQuotaSize=quota_rule=*:bytes=%$

user_attrs = mailMessageStore=home, mailQuotaSize=quota_rule=*:bytes=%$
user_filter = (&(objectClass=qmailUser)(|(mailAlternateAddress=%u)(mail=%u)(uid=%u))(accountActive=TRUE))


We also tried the easy solution which was to indicate a quota rule in order to ignore the mailbox but with no success. It still get every mailbox to calculate the quota.
We set mail_debug=yes to see if there was any error, but everything seemed to be ok.

Any suggestions?

Thank you very much in advanced.

Héctor Moreno Blanco.




______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.

______________________

Reply | Threaded
Open this post in threaded view
|

Re: Quota ignore subfolders

Timo Sirainen
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


signature.asc (205 bytes) Download Attachment