[Dovecot] (1.0.13) fsync failed: Disk quota exceeded for some accounts
eric.marin at utc.fr
Thu Nov 6 12:30:56 EET 2008
We've recently migrated the mail server used by our 5000 students, from
Tru64/UW-IMAP/Procmail/Postfix/mbox to Debian Etch/Dovecot/Deliver/Postfix/Maildir
E-mails are not stored directly on the server (except for index and control files), but on an NAS
that exports the students' homedirs on NFS. Each student has a 100MB quota on the NAS.
Here is the configuration :
vega:~# dovecot -n
# 1.0.13: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3
args: blocking=yes cache_key=%u dovecot
When one mails a student that has filled his quota, one immediately receives this message :
"Your message to <studentx> was automatically rejected:
Not enough disk space
Reporting-UA: vega; Dovecot Mail Delivery Agent
Final-Recipient: rfc822; studentx
Original-Message-ID: <490F0A9A.8030109 at utc.fr>
Disposition: automatic-action/MDN-sent-automatically; deleted"
And in /var/log/mail.log :
(...) save failed to INBOX: Not enough disk space
(...) Rejected: Not enough disk space
So far, so good, except that for *some* users (and I can't seem to find anything unusual about their
account), one gets this in /var/log/mail.log :
Nov 6 10:42:24 vega deliver(studentx):
fsync(/voletu/users/studentx/Maildir/tmp/1225964544.P25878Q0M80993.vega) failed: Disk quota exceeded
Nov 6 10:42:24 vega deliver(studentx): msgid=<2254E7BC-665D-4599-B719-825E3A58DC1D at utc.fr>: save
failed to INBOX: Internal error occurred. Refer to server log for more information. [2008-11-06
Nov 6 10:42:24 vega postfix/local: 010F45EC18: to=<studentx at vega.utc.fr>,
orig_to=<studentx at etu.utc.fr>, relay=local, delay=0.2, delays=0.02/0/0/0.17, dsn=4.3.0,
status=deferred (temporary failure)
So for *some* users, it seems that Deliver doesn't detect that there isn't enough space, it tries to
write the e-mail and of course fails, then reports an error, and Postfix interprets this as a
temporary error and retries later.
After about a week :
vega:~# qshape deferred
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 500 1 4 3 9 12 6 8 17 140 300
etu.utc.fr 499 1 4 3 9 12 6 8 17 139 300
vega.utc.fr 1 0 0 0 0 0 0 0 0 1 0
For the students that have this problem (about 30 for now), this happens *even* if I delete
~studentx/Maildir, /var/mail/index/studentx and /var/mail/control/studentx, let Deliver recreate the
necessary files (by sending the user a mail) so that everything is clean, artificially fill the
quota with a big file in the homedir, then send a mail again. It gets deferred...
I have looked at the changelog for Dovecot, but have not found a clear clue that is a bug (if it is
!) that has already been corrected in a more recent version...
Though if possible, I'd like to keep the Debian package (from etch-backports) instead of compiling
it from source.
Also, while I've found Dovecot's wiki to be surprisingly informative, there are still a few points
that did not seem very clear :
- should I use the quota:fs plugin in this case (it seems to work out well without it for most users) ?
- would it work in v1.0.13 on NFS ?
- if it worked, and I enabled it, what would change for me ?
- what is *supposed* to happen without the quota plugin when a user has filled his quota : mail is
rejected, or mail is deferred ?
- and what about imap_quota ?
More information about the dovecot