I too had put in code to calculate real quota
based on recursively doing stat's. This seems to
chew up *alot* of resources. I have over a thousand
domains and its hasn't been an issue to have a username per
domain. In fact, it works well and better than
when the quota code was in vdelivermail. I've since
stopped adding my own patch.
I'm seeing that the quota code in there now doesn't
seem to return the correct information. For several users,
vuserinfo seems to return 100% full all the time (when they
used 1.25 Meg out of 100 Meg).
I'd like to move the get_du() code from the qmailadmin
code to the vpopmail library. Bill/Ken, is this OK?
This is a platform independent routine that gets the
disk usage for a directory tree. This can be called
either on the user's directory or the domain's directory
to get the corresponding values. We can then build
a switch in vdelivermail to use this for the domain
limits. I'm not sure how to get the maildir quotas
working for per-domain, but in my case I'm seeing that
they haven't been too reliable. I have customers complaining
that sometimes mail is bouncing when they're only using 1Mb of space.
> Unfortunately adding a unique user per domain is not a viable solution
> for a lot of people especially when there are thousands of domains.
> I have implemented domain quota by tweaking old vpopmail code before
> maildirquota was implemented. Basically disabling user quota and
> recalculate quota for the entire domain when new mail arrives. Then
> comparing this number to the value MaxQuota inside .qmailadmin-limits to
> determine whether the entire domain is over quota or not. It is rather
> inefficient but it mostly works.
> Now I want to do the same with new vpopmail but I don't understand
> enough about the new way in which it calculates quota.
> If someone is more well verse and willing to do this, let me know and I
> can help. Otherwise, I will still attempt it but it will take a looong
> time to study the code.
> > -----Original Message-----
> > From: Claudio Nieder [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 28, 2003 1:53 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [vchkpw] disk quota per domain
> > Hi,
> > > Please give the workable answer...
> > Use vaddoains -u option to assign to each domain a different
> > user and use your OS quota facility to assign each user the
> > desired quota.
> > claudio
> > --
> > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357
> > 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212
> > mailto:[EMAIL PROTECTED] http://www.claudio.ch
Galaxy Networks, Inc.