[Dovecot] Problem with quota and mdbox and quota warning
Hi again,
I just recognized that my dovecot forgets the quota for a mailbox. This is what the maildirsize looks like:
1 read mail present, 1 new/unread mail 2097152S 0 0 909936 1
and later, with 2 read mails: 2097152S 0 0
There are no errors logged.
Moreover, my quota warning script doesn´t work because dovecot doesn´t recognize my specified folder. I specified /usr/local/etc/dovecot/quota-warning.sh but the log shows that dovecot looks somewhere else:
Error: quota: connect(/usr/local/var/run/dovecot/quota-warning) failed: Permission denied
# 2.0.1: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 disable_plaintext_auth = no mail_gid = vmail mail_location = mdbox:~/mdbox mail_plugins = quota mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date namespace { inbox = yes location = prefix = INBOX. separator = . type = private } passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { quota = maildir:User quota quota_rule2 = INBOX.Trash:storage=+50M quota_warning = storage=90%% quota-warning 90 %u quota_warning2 = storage=75%% quota-warning 75 %u sieve = ~/.dovecot.sieve sieve_global_path = /usr/local/etc/dovecot/sieve/default.sieve } protocols = lmtp imap sieve service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service imap-login { service_count = 1 } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } service_count = 1 } service quota-warning { executable = script /usr/local/etc/dovecot/quota-warning.sh user = vmail } ssl = no userdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = $mail_plugins sieve } protocol lda { mail_plugins = $mail_plugins sieve } protocol imap { mail_plugins = $mail_plugins imap_quota }
On 28.10.2010, at 13.38, Patrick Westenberg wrote:
I just recognized that my dovecot forgets the quota for a mailbox. This is what the maildirsize looks like:
mdbox doesn't work with Maildir++ quota, you need to use dict quota with e.g. file backend.
Moreover, my quota warning script doesn´t work because dovecot doesn´t recognize my specified folder. I specified /usr/local/etc/dovecot/quota-warning.sh but the log shows that dovecot looks somewhere else:
Error: quota: connect(/usr/local/var/run/dovecot/quota-warning) failed: Permission denied
You need to give enough permissions for that.
mail_uid = vmail .. service quota-warning { executable = script /usr/local/etc/dovecot/quota-warning.sh user = vmail
unix_listener quota-warning { user = vmail }
}
You should upgrade to v2.0.6 in any case. It'll also give you better error messages.
Timo Sirainen schrieb:
mdbox doesn't work with Maildir++ quota, you need to use dict quota with e.g. file backend.
Oh, very sad :( In this case we have to switch back to maildir.
You need to give enough permissions for that.
This file doesn´t exist. I created /usr/local/etc/dovecot/quota-warning.sh.
Timo Sirainen schrieb:
Error: quota: connect(/usr/local/var/run/dovecot/quota-warning) failed: Permission denied
You need to give enough permissions for that.
mail_uid = vmail .. service quota-warning { executable = script /usr/local/etc/dovecot/quota-warning.sh user = vmail
This behaviour is very weird. My script is /usr/local/etc/dovecot/quota-warning.sh and after reloading dovecot generates the file /usr/local/var/run/dovecot/quota-warning with wrong permissions?
So everytime I have or want to restart dovecot, I have to re-set the rights for this file?
On 28.10.2010, at 15.17, Patrick Westenberg wrote:
My script is /usr/local/etc/dovecot/quota-warning.sh and after reloading dovecot generates the file /usr/local/var/run/dovecot/quota-warning with wrong permissions?
So everytime I have or want to restart dovecot, I have to re-set the rights for this file?
No. Did you see this part of my mail:
service quota-warning { executable = script /usr/local/etc/dovecot/quota-warning.sh user = vmail
unix_listener quota-warning { user = vmail }
}
Set the permissions as you want in the unix_listener.
participants (2)
-
Patrick Westenberg
-
Timo Sirainen