Quotas appear to be working fine, and I have an explanation for the
results I am seeing. The maildirsize value is correct, even though it
does not agree with du, which is also correct.
Maildirsize calculates the number of bytes in a message. du calculates
the amount of disk space allocated to the file, used and unused. A small
message might contain only 1000 bytes, but it might require 4 disk blocks
or 2048 bytes to store the file.
Consequently, if there are thousands of small messages, as there are in
this case, actuall disk usage for an account can exceed the soft quota
limit by a significant amount, due to internal fragmentation. A file
system like reiserfs that does tail packing may help mitigate the impact
in this situation.
Thanks for everyone's help. It would be useful if this were included in
the documentation on how the maildirsize is calculated. Those who want
actual usage to be closer to the intended limit should account for a
certain percentage of internal fragmentation based on the intended size
and the average expected size of a message when determining the quota (or
also set a maximum number of messages).
I noticed an odd problem lately of one account going over quota by nearly
20%.