Charlie Watts writes:
> Why does sqwebmail set the MAILDIRQUOTA variable in '.mailfilter'?
>
>
> If there -isn't- a MAILDIRQUOTA variable in '.mailfilter', maildrop
> correctly inherits it from userdb.
Because a maildir quota can be initialized from other places, other than
userdb. sqwebmail reads the real quota from maildirsize, then uses it to
initialize MAILDIRQUOTA in the mail filter, so that everything matches up
together.
> For my situation, I'd like it if 'maildirsize' didn't contain the size of
Of course, you don't have to be concerned about how to go about actually
implementing these kinds of things, so you don't tend to think about various
pesky little implementation details. Such as, for example, if the
authoritative setting for the maildir's quota is taken from the
authentication module, such as userdb, it means that the authentication
module has to take a hit for every message operation, and not just for login
authentication. userdb is relatively lightweight, however if you're running
a big shop that authenticates from an LDAP directory, you don't really want
nearly every HTTP request to go and pound on your LDAP server, to make sure
that everything fits within the assigned quota.
Therefore the quota setting needs to be readily available with the least
amount of penalty for accessing it. And you can't get any more lightweight
than simply opening a file, and reading it. Therefore, the authoritative
quota setting has to come from maildirsize, and to avoid any confusion with
multiple quota settings (sqwebmail reads it from maildirsize, maildrop reads
it from userdb) the quota setting is forced to match whatever's in
maildirsize.
--
Sam