I'm thinking to a new solution, modifying qmailadmin as follows.

A unique ".qmailmaildirsize" should be created in the domain, and every user should have his own "maildirsize" linked by an "ln -sf" to the domain's ".qmailmaildirsize".

\domain\.qmailmaildirsize [global]
\domain\user1\Maildir\maildirsize --> ..\..\.maildirsize [-> global]
\domain\user2\Maildir\maildirsize --> ..\..\.maildirsize [-> global]
\domain\user3\Maildir\maildirsize --> ..\..\.maildirsize [-> global]
\domain\user4\Maildir\maildirsize [alone]
\domain\user5\Maildir\maildirsize [alone]

Each user using the domain quota should have the same quota (equal to the domain quota itself).

Users with own quota don't use this mechanism and have their private "maildirsize".

The only major add should be a routine to recheck the "domain's global usage" when domain's ".qmailmaildirsize" is created (or recreated after deletion), counting only users working with global "maildirsize".

Main problem I see could be the lock on the global ".maildirsize", domains (with global quota) with thousands of very active users could slow down on receiving messages.

All that should work with a very few modifications (none in vdeliver, vpopmail, etc., only a few in qmailadmin).


At 28/01/03 28/01/03 -0800, Lu wrote:
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
> 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

        Inter@zioni            Interazioni di Antonio Nati
   http://www.interazioni.it      [EMAIL PROTECTED]

Reply via email to