Kolab 3.0 quota removal

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Fri Sep 14 01:19:07 CEST 2012


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

> 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 ;-)

> 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 (^).

- 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).

Kind regards,

Jeroen van Meeuwen

--
Systems Architect

Kolab Systems AG
Zürich, Switzerland

e: vanmeeuwen at kolabsys.com
t: +41 43 501 66 91
m: +44 74 2516 3817
w: http://kolabsys.com

pgp: 0x9342BF08
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.kolab.org/pipermail/users/attachments/20120914/3920a4db/attachment.sig>


More information about the users mailing list