Kostik
2010-May-12 17:28 UTC
[Dovecot] Problems with the fs-quota plugin on delivery stage
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
Kostik
2010-May-12 17:51 UTC
[Dovecot] Problems with the fs-quota plugin on delivery stage
Kostik wrote:> Just noticed a strange behavior of the FS quota plugin on delivery stage.My /usr/local/sbin/dovecot -n is: --- # 1.2.11: /usr/local/etc/dovecot.conf # OS: Linux 2.6.32.12 i686 Slackware 11.0.0 base_dir: /var/run/dovecot/ protocols: imap pop3 listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login mail_debug: yes mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes lock_method: dotlock mbox_read_locks: dotlock_try mbox_write_locks: dotlock_try mbox_lock_timeout: 150 mbox_dotlock_change_timeout: 60 mbox_very_dirty_syncs: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_log mail_plugins(imap): quota imap_quota mail_log mail_plugins(pop3): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 pop3_no_flag_updates(default): no pop3_no_flag_updates(imap): no pop3_no_flag_updates(pop3): yes pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh lda: postmaster_address: MAILER-DAEMON at xxxxx.xxxx quota_full_tempfail: no deliver_log_format: from=<%f>, msgid=%m: %$ 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 debug: yes passdb: driver: sql userdb: driver: prefetch socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: fs:Quota:user mail_log_events: delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields: box from subject size =kostik