Hi
I'am using dovecot with quota_rule stored in mysql user table, and quota
usage stored in mysql dict
###### Quota #############
dict {
quotadict = mysql:/usr/local/etc/dovecot-quota.conf
}
plugin {
quota = dict:user::proxy::quotadict
quota_rule2 = Trash:storage=10%%
quota_rule3 = Sent:ignore
#quota_rule = *:storage=10M
}
###################################
Everything works as expected, but I have some inconveniences for domains
with large number of mailboxes. Allocating and maintain quota to every
account it's a hard job.
I just want to implement some flexibility for this situations (ex the
first enforcement to be the user quota and the second to be the domain
quota).
Is there a way to implement such thing in dovecot and what are the
adjustments that I need to do.
Regards
Alex
On 10.05.2010 13:49, alex wrote:> > Everything works as expected, but I have some inconveniences for > domains with large number of mailboxes. Allocating and maintain quota > to every account it's a hard job. > I just want to implement some flexibility for this situations (ex the > first enforcement to be the user quota and the second to be the > domain quota). > Is there a way to implement such thing in dovecot and what are the > adjustments that I need to do. > > Regards > > Alex >Why don't you implement domain quota in terms of filesystem quota? So basically, every domain has differend user, UID and GID. You use the usual quota tools to enforce soft/hard limits, enforcement period etc. based on user or group. And you leave mailbox quota handled by dovecot. Best regards -- Luben Karavelov Research and development Spectrum Net JSC 36, D-r G. M. Dimitrov Blvd. 1797 Sofia Mobile: +359 884332140 url: www.spnet.net
On Mon, 2010-05-10 at 13:49 +0300, alex wrote:> I just want to implement some flexibility for this situations (ex the > first enforcement to be the user quota and the second to be the > domain > quota).You can create domain quota with dict. quota2 = dict:<quota root name>:<user name>:<dictionary URI> Just set "user name" to %d so it expands to domain. The main problem with this is that there's no easy way to recalculate the domain quota if you ever need to do so.