[Dovecot] Problems with the fs-quota plugin on delivery stage

Kostik koc at fax.ru
Wed May 12 20:28:04 EEST 2010


Hi All!

Just noticed a strange behavior of the FS quota plugin on delivery stage.
We use group FS quotas via NFS. And quota-tool says:
---
Disk quotas for group #5751796 (gid 5751796):
     Filesystem    blocks   quota   limit   grace
     nfse:/export    1276   10240   10240
---
I run:
---
cat ./test.eml | /usr/local/libexec/dovecot/deliver -e -n -d xxxx at xxxxx.xxxx
---
and get:
---
Quota exceeded (mailbox for user is full)
---
But ./test.eml is 7088147 bytes and it is not above the quota.


dovecot debug log is:
---
May 12 20:01:46 dovecot: deliver(xxxx at xxxxx.xxxx): fs quota block device =
nfse:/export
May 12 20:01:46 dovecot: deliver(xxxx at xxxxx.xxxx): fs quota mount point =
/mount/m5
May 12 20:01:47 dovecot: deliver(xxxx at xxxxx.xxxx): quota-fs: host=nfse,
path=/export, gid=5751796, bytes
May 12 20:01:47 dovecot: deliver(xxxx at xxxxx.xxxx): quota-fs: gid=5751796,
value=8409088, limit=10485760, active=1
May 12 20:01:47 dovecot: deliver(xxxx at xxxxx.xxxx): from=<xxxx at xxxxx.xxxx>,
msgid=<4BEA4744.1040701 at xxxx@xxxxx.xxxx>: save failed to INBOX: Quota
exceeded (mailbox for user is full)
---
It seems that "value=8409088, limit=10485760" shows that the quota is no
problem, but "save failed".

If I become that user, then no problems. I can copy ./test.eml without
problems. Now quota-tool says:
---
   Filesystem    blocks   quota   limit   grace
   nfse:/export    8212   10240   10240
---
If I try to copy again(over quota), then honestly get:
---
cp: closing `./test2.msg': Disk quota exceeded
---

If I switch off quota plugin on dovecot.conf (LDA specific settings), then:
- 1. The first delivery is without error, but the INBOX is corrupted(last
msg is clipped) but quota-tool show only 3300 blocks used (quota is 10240
blocks).
- 2. Following delivery big msgs (over quoted) ends with an error: "Not
enough disk space" (this is correct, because the quota is really ended)
- 3. Following delivery small msgs (above quoted) ends well, msgs are
delivered (used 3304 blocks and etc.)

Our setup:
-- slackware 11.0, x86_32
-- linux 2.6.31.6
-- dovecot 1.2.11
-- mailbox(not maildir) via NFS storage.


Please, tell me where to start looking for the problem?


=kostik


More information about the dovecot mailing list