[Kolab-devel] (fwd) how to deal with quotas / suggested feature "monthly quota increase"

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at kolabsys.com
Tue Sep 21 01:59:06 CEST 2010


Gunnar Wrobel wrote:
> Zitat von "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen at kolabsys.com>:
> > Gunnar Wrobel wrote:
> >> Zitat von "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen at kolabsys.com>:
> >> > 2) Adjust the LDAP quota setting for the users.
> >> > 
> >> > 2.a) Using some formula that is in a configuration file somewhere;
> >> > 2.b) Use the updated values in the report
> >> 
> >> I definitely like it. I would probably skip the bonus points :) but
> >> thats not important. A question I would have concerning 2.a): Gavin
> >> required two attributes for his approach. Within 2.2.4 we can use
> >> cyrus-userquota for one of them but where does the %-increase
> >> information come from?
> > 
> > Which two attributes would that be?
> 
> The current quota ($cg) and the monthly increase ($percent-float or
> $static) - see below.
> 

I think there is also the 'threshold' - the "do not increase quota if current 
usage is under X% or there is still Y megabytes left".

The "current quota" is stored in Cyrus (maybe from "whatever" attribute in 
LDAP was used to synchronize that quota from including 'cyrus-quota' as well 
as 'mailQuota'). For this, no LDAP schema changes would be required. The 
program, however, may want to consider the attribute used to be configurable.

The other config-value needed ($%-float / $int) does not have to be stored in 
LDAP either if it applies to an environment; the value can be set in a 
configuration file. If however (see below) this needs to be tracker on a per-
user basis, then yes, these users are in LDAP and so their user-specific 
attributes should go in LDAP. I would, to prevent creating administrative 
overhead, consider creating what's called 'Class of Service' policies and 
(role-) templates.

> > One is the interval, which;
> > 
> > - Either directly aligns with the cronjob run interval, or
> > 
> > - Requires additional tracking of "latest update timestamp"
> > 
> > The other one is the actual formula:
> > 
> > Q($cq) = ($cq * $percent-float) + ($cq + $static)
> > 
> > Where:
> > 
> > - $cq is the current quota value,
> > - $percent-float is ($conf-value / 100) || 0
> > - $static is a static increase in MB, configurable of course
> 
> Where should the script get these values from? They were meant to be
> set per user so I assume they would also come from LDAP right?
> 

I think they were meant to *apply* to a single user, but did not need to be 
configured on a per-user basis.

Kind regards,

-- 
Jeroen van Meeuwen
Senior Engineer, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
t: +316 42 801 403
w: http://www.kolabsys.com

pgp: 9342 BF08




More information about the devel mailing list