Understanding filesystem quotas

Chris Szilagyi chris at apex-internet.com
Fri Nov 14 14:24:42 UTC 2014

> Are you sure, that you:
> 1) have enabled quotas on /home/username/mail,

If you mean filesystem quotas, then yes.  In our environment, /home is
symlinked to another local disk /volume/home, and the quotas are set on

> 2) have reloaded Dovecot after config change,

Definitely have done that.

> 3) have read dovecot logs, if there are errors, and

Quite a while after testing and posting this, these errors started showing
up in /var/log/maillog ... I'm currently investigating.  This may be part of
the issue.

dovecot: imap(username): Error: quotactl(Q_GETQUOTA, /dev/sdb1) failed:
Permission denied

> 4) maybe you need to configure a limit, in order to enable quotas in
> Dovecot at all.

By this do you mean a user limit?  I've set the default limit with
"quota_rule = *:storage=1G".

We aren't using a userdb so I tried using the passwd file method by
appending the text "userdb_quota_rule=*:bytes=100M" to the end of the
entries in /etc/passwd.  So far this hasn't made any difference either, and
even when doing that, doveadm still doesn't see what the user's limit is set
to, it just shows zero (0).  This puzzles me as I would think that it would
at least show what the default limit is.

> 5) maybe try the mount=<path> option, http://wiki2.dovecot.org/Quota/FS

I have tried that as well, so far no luck.

>> then? I would prefer to let Dovecot enforce quotas rather than rely on the
>> filesystem quota mechanism, but keep disk I/O down.
> Dunno if "rely" sounds like you don't trust it ;-) But you should place
> INDEXes somewhere else, if you enforce quota via file system.

Yes I did catch that in the documentation.  I am currently looking at doing
that after I get quotas working.

I am still unclear as to how Dovecot actually enforces quotas when using the
filesystem.  I understand it must use the filesystem quotas for looking at
the current disk usage for a user, but can Dovecot enforce the quotas on its
own (for example, if I set the hard and soft limits of the user to 0 for
filesystem quotas) or does Dovecot rely on the filesystem quotas to do the

Thank you again for the help.  I will post back any additional information
if I am able to get further on this.


More information about the dovecot mailing list