[Dovecot] quota warning - take 2

Timo Sirainen tss at iki.fi
Tue Apr 10 17:59:25 EEST 2007


On Wed, 2007-04-04 at 17:34 +0200, Nicolas Boullis wrote:
> 
> > This would make it easy. That code is already written, but it's not
> in
> > Dovecot's CVS yet. It would be useful also in dovecot-auth.
> Originally I
> > was thinking about using the code to replace the waitpid() calls in
> > master, but that change got a bit complex so I forgot about it then.
> 
> OK, then I guess I should consider it when I do the porting to current
> CVS HEAD. Right? 

Yea.

> By the way, any documentation I should read about quota
> setups, quota rules, and quota roots for IMAP? When I had a look at
> the
> quota backport for 1.0, I failed to understand how things work
> together...

v1.0's quota code is somewhat kludgy. Quota setup is nothing, forget
that. It's already removed from CVS HEAD. I think the examples in
dovecot-example.conf should help with understanding quota rules and
roots:

  # Quota limits are set using "quota_rule" parameters, either in here or in
  # userdb. It's also possible to give mailbox-specific limits, for example:
  #   quota_rule = *:storage=1048576
  #   quota_rule2 = Trash:storage=102400
  # User has now 1GB quota, but when saving to Trash mailbox the user gets
  # additional 100MB.
  #
  # Multiple quota roots are also possible, for example:
  #   quota = dict:user::proxy::quota
  #   quota2 = dict:domain:%d:proxy::quota_domain
  #   quota_rule = *:storage=102400
  #   quota2_rule = *:storage=1048576
  # Gives each user their own 100MB quota and one shared 1GB quota within
  # the domain.

> Does this mean it looks good enough for you and you have nothing to
> criticize? Wow!

I was mostly concerned about if the the configuration should be done
like that or somehow differently. But I think it's good now. With CVS
HEAD you'd have to support multiple quota roots though, so:

quota_warning = ..
quota_warning2 = ..
quota2_warning = ..

There are also some minor coding style things to keep it consistent, but
I'll change them when I merge the code. And :2 needs to be removed here,
it's a GCC extension:

+	enum quota_warning_limit_kind storage_limit_kind:2;
+	enum quota_warning_limit_kind count_limit_kind:2;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070410/9b280568/attachment.pgp 


More information about the dovecot mailing list