Well.. With dict quota you could already do this, but quota recalculation wouldn't work right. Quota recalculation shouldn't happen normally though, so you might get away with it. But to fix quota recalculation you'd have to do something like you're describing I guess..
With v1.2 this would be somewhat easier I think, because it allows you to create new user structures, look up their home dirs (by querying dovecot-auth) and calculate their quotas. But you'd still need a way to get a list of usernames who share the quota.
All of this is actually related to "domain quotas" that I've been thinking about for a long time. If there was a way to recalculate the quota for multiple users I'd be interested in getting the code added to Dovecot.
On Tue, 2009-03-10 at 11:59 +0900, Jorgen Lundman wrote:
Since I could issue an LDAP query for (&(uidNumber=%uid)(gidNumber=%gid)) for homeDirectory to retrieve all home directory paths, and associated mailDirSize files, I wonder if I could extend dovecot to allow us to handle shared quota like the fs-quota used to work.
Using symlinks between accounts would very quickly deteriorate.
Lund
Jorgen Lundman wrote:
Hello list,
We are in the process of exploring the idea of moving from UFS with fs-quota to using softquotas in Dovecot (probably Maildir type, stored in LDAP, all ontop of NFS).
I have it setup, and it works rather well so far.
But there is one situation we can currently support, which I can not see a solution for with soft-quotas.
Generally customers get 1 email, with 1 quota.
But it is also possible for customers to get 1 quota, but create multiple mail accounts, all sharing the same quota. This is done by using the same UID for each account when using fs-quota.
(It is not that each account gets a fraction of the quota, but that all accounts add up to the one quota).
Is this still possible to do with soft-quotas. To share one set. Dovecot would have to go count files in multiple mail-directories so I would guess no.
Lund