Kolab 3.0 quota removal

Troy Carpenter troy at carpenter.cx
Fri Sep 14 06:11:05 CEST 2012


On Friday, September 14, 2012 12:19:07 AM Jeroen van Meeuwen wrote:
> On Thursday, September 13, 2012 05:21:56 PM Troy Carpenter wrote:
> > Hi,
> > 
> > Testing Kolab 3.0 and all the users apparently were created with a quota
> > of 1048576.  How do I remove it?
> 
> The setting is called "default_quota" and is a per-domain setting in
> /etc/kolab/kolab.conf

Do I just delete that line in the file, or do I set it to something that 
indicates there shouldn't be a quota?


> > I tried:
> > 
> > [root at mercury ~]# kolab sq user/troy at carpenter.cx
> > New quota: 0
> > [root at mercury ~]# kolab lq user/troy at carpenter.cx
> > 
> > Traceback (most recent call last):
> >    File "/usr/sbin/kolab", line 39, in <module>
> >    
> >      kolab = Cli()
> >    
> >    File "/usr/lib/python2.6/site-packages/pykolab/cli/__init__.py", line
> > 
> > 55, in __init__
> > 
> >      commands.execute('_'.join(to_execute))
> >    
> >    File "/usr/lib/python2.6/site-packages/pykolab/cli/commands.py", line
> > 
> > 136, in execute
> > 
> >      commands[cmd_name]['function'](conf.cli_args, kw)
> >    
> >    File
> > 
> > "/usr/lib/python2.6/site-packages/pykolab/cli/cmd_list_quota.py", line
> > 61, in execute
> > 
> >      percentage = round((used/quota)*100, 1)
> > 
> > ZeroDivisionError: integer division or modulo by zero
> 
> This is a bug that I would love to see a ticket for so I can resolve it when
> I wake up tomorrow. Tracebacks are bad and should never happen ;-)
>

Bug filed and assigned to you: https://issues.kolab.org/show_bug.cgi?id=1005

> > Then, when I try to add more email, I still get quota messages.  I
> > thought a 0 value disabled quotas.  I also tried the value "none" as the
> > new quota.
> > 
> > I have two users that this is a problem.  Right now I've tried setting
> > the quota much higher than the default and that has helped, but I'd
> > rather just remove it.
> > 
> > Any insight?
> 
> A quota of 0 has always been a little ambiguous, but in the context of Cyrus
> IMAP a quota of 0 literally means 0KB, and not "no quota anymore".
> 
> Whenever a quota is set, it creates a quota root that cannot be deleted
> through any existing IMAP command.
> 
> To remove a quota root, and effectively remove the quota restriction
> entirely, connect to the IMAP server over SSH, and navigate to (in your
> case) /var/lib/imap/domain/c/carpenter.cx/quota/t/ and remove the file
> user.troy^carpenter (in your case, I presume).
> 
> I think as an example these paths work anyway, but just in case you want to
> double-check;
> 
> - the files are named using the internal naming convention for Cyrus IMAP.
> The hierarchy separator is a dot (.) character, and dots in folder names
> become carets (^).
> 

I was able to remove those files (there were slightly different than you have 
above, but still a piece of cake.

> - the contents of these files are two lines; the first line is the actual
> space usage in bytes, the second is the quota restriction in kilobytes. You
> could check the output of /usr/lib/cyrus-imapd/quota and see if things match
> up with your expectations before you remove the file.
> 
> After you remove that file, run /usr/lib/cyrus-imapd/quota -f and you should
> be good to go (check /usr/lib/cyrus-imapd/quota again, or run kolab lq
> user/*@carpenter.cx for example).

Verified with the /usr/lib/cyrus-imapd/quota command.  kolab lq gave another 
traceback, and I posted another bug for that: 
https://issues.kolab.org/show_bug.cgi?id=1006

Thanks for the help!  This was a most useful email.

Troy Carpenter




More information about the users mailing list