[Dovecot] best way to activate quota

Angel L. Mateo amateo at um.es
Wed Sep 12 17:18:47 EEST 2012


El 12/09/12 13:34, Gábor Lénárt escribió:
> On Wed, Sep 12, 2012 at 01:28:58AM +0300, Timo Sirainen wrote:
>> Activating quota is equally slow, because it needs to scan sizes of all
>> files.  If the size is stored in maildir filename (,S=123) this is pretty
>> fast, otherwise it's pretty slow because Dovecot stat()s the files, but
>> afterwards it stores them to dovecot-uidlist file.  So the main difference
>> is that Maildir++ requires rescanning the quota periodically, while dict
>> quota never rescans unless you run doveadm quota rescan.
>
> Ahaa, thanks for your answer.
>
> But ... why is rescan needed sometimes with maildir++? If I don't touch
> maildir by other softwares ever (I even have maildir_very_dirty_syncs = yes)
> just dovecot pop3/imap and incoming mails via dovecot's lmtp (no other MDAs,
> not even the LDA, etc), then why is it needed to rescan periodically with
> maildir?  I don't really understand the difference then which needs quota
> rescan with maildir++ but not with dict quota during the very same usage
> environment otherwise.
>
> Anyway I guess, having dict quota with SQL backend is not so a bad idea: I
> would be able to check incoming mails (at MXs) if target user will have
> enough space to hold the mail by using the mail size and quota usage (from
> SQL what dict quota uses as well) on the MXs using eg postfix policy server
> ... So I won't generate ugly NDRs later, after accepted mails. Not 100%
> accurate (quota usage may change while mail hits dovecot) but at least it
> will stop the majority of those quota related NDRs I have problems with
> currently.
>
> The only thing which keep me away from dict quota with sql backend that it
> needs much more complex stuff than simply using maildir++ quota, but it's
> maybe only my lazyness ...
>
	You could also use dict quota stored in a file in the user's home 
directory as maildir++ quota does. This is the way I'm going to use it, 
not with a sql backend.


-- 
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337



More information about the dovecot mailing list