[Dovecot] "multiple quota roots" complains

Kostik koc at fax.ru
Fri Oct 16 17:06:39 EEST 2009


Timo Sirainen wrote:
>> Introduction:
>> If dovecot LDA save failed to mbox (not enough disk space, for example),
>> it does not do rollback. Then my mailbox was corrupted. Last message is
>> dropped in the middle of headers(body, attachments, etc).
> 
> That shouldn't be happening, even if you're not using quota plugin at
> all. What does Dovecot log in that situation?

I'm sorry, but this happens if I do not use quota plugin for LDA. :(

My environment is:
-- OS: Linux 2.6.30 i686 Slackware 11.0.0
-- dovecot 1.2.6 (with 2 patchs: stat((null)) + istream-seekable)
-- user inbox(mbox) and homedir(with mbox) locate at NFS (OS: Linux
2.6.18.7 i686 Slackware 11.0.0)
-- NFS has file system group quota

Test user is over quoted:
---
Disk quotas for group #5751796 (gid 5751796):
Filesystem    blocks   quota   limit
nfse:/export   23768*  10240   10240
---

dovecot -n
---
# 1.2.6: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.30 i686 Slackware 11.0.0
base_dir: /var/run/dovecot/

[ skip listen and ssl_* conf params ]

mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
mbox_write_locks: dotlock_try fcntl

mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota

lda:
  mail_plugins: quota
  quota_full_tempfail: no
  sendmail_path: /usr/lib/sendmail
  rejection_subject: Rejected: %s
  rejection_reason: Your message to <%t> was automatically rejected:%n%r
  auth_socket_path: /var/run/dovecot/auth-master
auth default:
  mechanisms: plain login
  passdb:
    driver: sql
  userdb:
    driver: prefetch
  userdb:
    driver: sql
  socket:
    type: listen
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
plugin:
  quota: dirsize:Quota
  quota2: fs:Quota:group
---

If I change only one string (disable LDA quota): "lda: mail_plugins:
quota", my inbox starts corrupt.

1. LDA with quota plugin log:

$ echo "123123123" |  /usr/local/libexec/dovecot/deliver -d koc
---
Quota root: name=Quota backend=dirsize args=
Quota rule: root=Quota mailbox=* bytes=10383360 messages=0
Quota root: name=Quota backend=fs args=group
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. LDA without quota plugin:

$ echo "123123123" |  /usr/local/libexec/dovecot/deliver -d koc
---
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
close(/var/virtual/mail/I/I/koc.lock) failed: Disk quota exceeded
from=<>, msgid=: saved mail to INBOX
---

My INBOX before delivery:
-rw------- 1 5751796 5751796 4087 2009-10-16 17:24 koc
after:
-rw------- 1 5751796 5751796 4096 2009-10-16 17:25 koc
(look at size, now it 8*512k blocks)

If INBOX is zero size, than deliver say same: "lock failed, saved mail to
INBOX", but INBOX size still zero. If INBOX is 1 byte size, than deliver
say same, but message writes to INBOX to full 512k block.

> Or what does your MTA log? Does it say deliver crashed? Because that's
> the only reason I can think of that it would leave the mbox corrupted.
> Post your dovecot -n output also?

MTA log is: stat=ok3: saved mail to INBOX. Deliver not crash. I can make
strace if it helps.

> The stat((null)) should be fixed by this:
> http://hg.dovecot.org/dovecot-2.0/rev/14eeed133d57

I backport it to dovecot-1.2 and "stat((null))" fixed now! Thanx again, Timo!


=kostik


More information about the dovecot mailing list