[Dovecot] FS Quota broken for delivering BIG message

Kostik koc at fax.ru
Thu Oct 15 13:06:26 EEST 2009


Hi everybody.

I have Linux file system quota for users and enabled "fs quota" and quota
plugin for LDA. My test user is already deep over quoted:
---
Filesystem    blocks   quota   limit
nfse:/export   23768*  10240   10240
---

1. If I tries to deliver _short_ message to user mbox - quota works:

$ echo "123123123123" | /usr/local/libexec/dovecot/deliver -d koc
---
Quota root: name=Quota backend=fs args=group:mount=/var/virtual/home/I/I/koc
Quota rule: root=Quota mailbox=* bytes=10383360 messages=0
mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY
fs: root=/var/virtual/home/I/I/koc, index=, control=,
inbox=/var/virtual/mail/I/I/koc
fs quota add storage dir = /var/virtual/home/I/I/koc
fs quota block device = nfse:/export
fs quota mount point = /mount/m5
quota-fs: host=nfse, path=/export, gid=5751796, bytes
quota-fs: gid=5751796, value=24338432, limit=10485760, active=1

from=<>, msgid=: save failed to INBOX: Quota exceeded (mailbox for user is
full)
from=<>, msgid=: rejected: Quota exceeded (mailbox for user is full)
msgid=: Return-Path missing, rejection reason: Quota exceeded (mailbox for
user is full)
---

2. But if I tries to deliver _BIG_ message to user mbox - quota broken:

$ cat big.msg | /usr/local/libexec/dovecot/deliver -d koc
---
Quota root: name=Quota backend=fs args=group:mount=/var/virtual/home/I/I/koc
Quota rule: root=Quota mailbox=* bytes=10383360 messages=0
mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY
fs: root=/var/virtual/home/I/I/koc, index=, control=,
inbox=/var/virtual/mail/I/I/koc
fs quota add storage dir = /var/virtual/home/I/I/koc
fs quota block device = nfse:/export
fs quota mount point = /mount/m5
quota-fs: host=nfse, path=/export, gid=5751796, bytes
quota-fs: gid=5751796, value=24338432, limit=10485760, active=1

write_full(/var/virtual/home/I/I/koc/.temp.pigeon01.8822.64dfacc7e57d71b4)
failed: Disk quota exceeded
stat(/tmp/Dovecot Delivery Mail) failed: Disk quota exceeded
from=<>, msgid=: save failed to INBOX: BUG: Unknown internal error
---


This "write_full() failed" from: src/lib/istream-seekable.c
---
static ssize_t i_stream_seekable_read(struct istream_private *stream)
{
...
                /* save to our file */
                data = i_stream_get_data(sstream->cur_input, &size);
                if (write_full(sstream->fd, data, size) < 0) {
                        i_assert(errno != 0);
                        stream->istream.stream_errno = errno;
                        i_error("write_full(%s) failed: %m",
                                sstream->temp_path);
                        i_stream_close(&stream->istream);
                        return -1;
                }
...
}
---


=kostik


More information about the dovecot mailing list