[Dovecot] trouble with setting individual quota values for multiple namespaces

2013-08-01 Thread Andreas Oster
Hello all

please apologize that I repost this problem again. I tried to get some
help several times on the list but did not find/get a solution.

I am still struggling to setup different quotas for namespaces.

In addition to the default INBOX namespace I have created a namespace
called MailArchive which should have its own quota value of 5G per user.

At first I configured quota2 like this:

  quota2 = maildir:MailArchive quota:ns=MailArchive/
  quota2_rule = *:storage=5G

and this seemd to work quite well. Users, accessing the MailArchive
namespace can see the 5G limit in their mail client, unfortunately in
the mail.err log file, errors like these repeatedly appear:

Jul 29 11:40:24 mailserver dovecot: imap(testuser): Error: quota:
Unknown namespace: MailArchive/
Jul 29 11:41:43  dovecot: last message repeated 47 times


In the WIKI I have read, that in order to have quota for different
namespaces, one would have to use different quota backends so I changed
the quota config for the MailArchive namespace to SQL.


namespace inbox {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
driver =
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
driver =
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
driver =
special_use = \Sent
  }
  mailbox Sent Messages {
auto = no
driver =
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
driver =
special_use = \Trash
  }
  prefix =
  separator = /
  subscriptions = yes
  type = private
}

namespace {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = yes
  location = maildir:/var/vmail/archive/%Ln/Maildir
  mailbox Archived Mails {
auto = subscribe
driver =
  }
  prefix = MailArchive/
  separator = /
  subscriptions = yes
  type = private
}

plugin {
  quota = maildir:User quota:ns=
  quota2 = dict:Archive Quota:%u.mailarchive:ns=MailArchive/:proxy::sqlquota
  quota2_rule = *:storage=5G
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+200M
}

dict {
 sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}


Unfortunately this did not change anything. Quota is working like
expected but I still get the same errors in mail.err.

I am currently using dovecot version 2.2.4.

Thank you for your kind help

best regards

Andreas



Re: [Dovecot] trouble with setting individual quota values for multiple namespaces

2013-08-01 Thread Timo Sirainen
On 1.8.2013, at 11.09, Andreas Oster aos...@novanetwork.de wrote:

 please apologize that I repost this problem again. I tried to get some
 help several times on the list but did not find/get a solution.
 
 I am still struggling to setup different quotas for namespaces.
 
 In addition to the default INBOX namespace I have created a namespace
 called MailArchive which should have its own quota value of 5G per user.
 
 At first I configured quota2 like this:
 
  quota2 = maildir:MailArchive quota:ns=MailArchive/
  quota2_rule = *:storage=5G
 
 and this seemd to work quite well. Users, accessing the MailArchive
 namespace can see the 5G limit in their mail client, unfortunately in
 the mail.err log file, errors like these repeatedly appear:
 
 Jul 29 11:40:24 mailserver dovecot: imap(testuser): Error: quota:
 Unknown namespace: MailArchive/
 Jul 29 11:41:43  dovecot: last message repeated 47 times

I can't reproduce this, works fine for me. Show your entire doveconf -n output? 
Also set mail_debug=yes and show what it logs when you log in.

 In the WIKI I have read, that in order to have quota for different
 namespaces, one would have to use different quota backends so I changed
 the quota config for the MailArchive namespace to SQL.

The wiki was wrong, you can use two Maildir++ quota backends for different 
namespaces. I updated the wiki now.



Re: [Dovecot] trouble with setting individual quota values for multiple namespaces

2013-08-01 Thread Timo Sirainen
On Thu, 2013-08-01 at 13:17 +0300, Timo Sirainen wrote:
 On 1.8.2013, at 11.09, Andreas Oster aos...@novanetwork.de wrote:
 
  please apologize that I repost this problem again. I tried to get some
  help several times on the list but did not find/get a solution.
  
  I am still struggling to setup different quotas for namespaces.
  
  In addition to the default INBOX namespace I have created a namespace
  called MailArchive which should have its own quota value of 5G per user.
  
  At first I configured quota2 like this:
  
   quota2 = maildir:MailArchive quota:ns=MailArchive/
   quota2_rule = *:storage=5G
  
  and this seemd to work quite well. Users, accessing the MailArchive
  namespace can see the 5G limit in their mail client, unfortunately in
  the mail.err log file, errors like these repeatedly appear:
  
  Jul 29 11:40:24 mailserver dovecot: imap(testuser): Error: quota:
  Unknown namespace: MailArchive/
  Jul 29 11:41:43  dovecot: last message repeated 47 times
 
 I can't reproduce this, works fine for me. Show your entire doveconf -n 
 output? Also set mail_debug=yes and show what it logs when you log in.

Fixed, happened because of shared mailboxes:
http://hg.dovecot.org/dovecot-2.2/rev/1705bf7bf484




Re: [Dovecot] trouble with setting individual quota values for multiple namespaces

2013-08-01 Thread Andreas Oster
Am 01.08.2013 14:02, schrieb Timo Sirainen:
 On Thu, 2013-08-01 at 13:17 +0300, Timo Sirainen wrote:
 On 1.8.2013, at 11.09, Andreas Oster aos...@novanetwork.de wrote:

 please apologize that I repost this problem again. I tried to get some
 help several times on the list but did not find/get a solution.

 I am still struggling to setup different quotas for namespaces.

 In addition to the default INBOX namespace I have created a namespace
 called MailArchive which should have its own quota value of 5G per user.

 At first I configured quota2 like this:

  quota2 = maildir:MailArchive quota:ns=MailArchive/
  quota2_rule = *:storage=5G

 and this seemd to work quite well. Users, accessing the MailArchive
 namespace can see the 5G limit in their mail client, unfortunately in
 the mail.err log file, errors like these repeatedly appear:

 Jul 29 11:40:24 mailserver dovecot: imap(testuser): Error: quota:
 Unknown namespace: MailArchive/
 Jul 29 11:41:43  dovecot: last message repeated 47 times

 I can't reproduce this, works fine for me. Show your entire doveconf -n 
 output? Also set mail_debug=yes and show what it logs when you log in.
 
 Fixed, happened because of shared mailboxes:
 http://hg.dovecot.org/dovecot-2.2/rev/1705bf7bf484
 
 
 
Hello Timo,

that was really fast, thank you very much. I will try your patch and
report my findings.

best regards

Andreas



Re: [Dovecot] trouble with setting individual quota values for multiple namespaces

2013-08-01 Thread Andreas Oster
Am 01.08.2013 14:02, schrieb Timo Sirainen:
 On Thu, 2013-08-01 at 13:17 +0300, Timo Sirainen wrote:
 On 1.8.2013, at 11.09, Andreas Oster aos...@novanetwork.de wrote:

 please apologize that I repost this problem again. I tried to get some
 help several times on the list but did not find/get a solution.

 I am still struggling to setup different quotas for namespaces.

 In addition to the default INBOX namespace I have created a namespace
 called MailArchive which should have its own quota value of 5G per user.

 At first I configured quota2 like this:

  quota2 = maildir:MailArchive quota:ns=MailArchive/
  quota2_rule = *:storage=5G

 and this seemd to work quite well. Users, accessing the MailArchive
 namespace can see the 5G limit in their mail client, unfortunately in
 the mail.err log file, errors like these repeatedly appear:

 Jul 29 11:40:24 mailserver dovecot: imap(testuser): Error: quota:
 Unknown namespace: MailArchive/
 Jul 29 11:41:43  dovecot: last message repeated 47 times

 I can't reproduce this, works fine for me. Show your entire doveconf -n 
 output? Also set mail_debug=yes and show what it logs when you log in.
 
 Fixed, happened because of shared mailboxes:
 http://hg.dovecot.org/dovecot-2.2/rev/1705bf7bf484
 
 
 
Hello Timo,

thanks to your patch the error messages have disappeared.
Thank you very much for your kind help.

best regards

Andreas