On Sep 27, 2009, at 2:44 PM, Christian Boltz wrote:
> Thanks for your patch!
> I like your idea of having a per-domain total quota which can be used
> for one big or 100 small mailboxes. However, I'd like to ask to to do
> some changes to your changes ;-)
No problem, I realize it's most likely not in the best shape as it
stands.
> If I get your patch right (I just had a quick look at it), you are
> _replacing_ the current quota implementation with a per-domain total
> quota. I'd like to have both - a per-domain quota as in your patch
> and a
> quota limit for each mailbox (as in the current implementation) for
> some
> reasons:
> - admins might still want to have a maximum per-mailbox size
> - replacing the meaning of the maxquota field from "max quota per
> mailbox" to "quota per domain" would cause big problems on upgrade
> - we would also break backwards compatibility (by replacing the
> meaning
> of maxquota) without a real need
> - with a separate field, upgrading would be easy. The per-domain quota
> could be calculated on upgrade:
> allowed mailboxes * quota per mailbox = quota for the domain
>
> There's an unused column "quota" in the domain table - you can use it
> for the per-domain quota.
Ok, so a question, would it be good to add a new field to the domain
creation screen for "Domain quota" in addition to the existing "Max
Qupta" field? That way a admin could decide which style of quota to
use on a per domain basis. Ie: foo1.com has no domain quota, but can
only have mailboxes of a size max_quota and foo2.com has a domain
quota of 10MB to split amongst as many mailboxes as needed?
> Another small issue with your patch: I'd prefer to read the domain
> from
> the username instead of adding another parameter to check_quota().
As in parse the domain from the username? Are there any potential
security issues from using a regex instead of confirming via the
database? I guess you are already doing this in quite a few places, so
maybe I'm just being lazy...
-Warren
|