[Dovecot] Quota fs (don't start script quota-warning.sh)
Hi,
# doveadm -Dv quota get -u pit doveadm(pit): Debug: auth input: pit system_groups_user=pit uid=500 gid=500 home=/home/pit doveadm(pit): Debug: Effective uid=500, gid=500, home=/home/pit doveadm(pit): Debug: Quota root: name=INBOX backend=fs args=mount=/var/spool/mail doveadm(pit): Debug: Quota rule: root=INBOX mailbox=* bytes=19922944 messages=0 doveadm(pit): Debug: Quota warning: bytes=3984588 (20%) messages=0 reverse=no command=quota-warning 20 pit doveadm(pit): Debug: fs: root=/home/pit/mail, index=, control=, inbox=/var/spool/mail/pit doveadm(pit): Debug: fs quota add mailbox dir = /var/spool/mail doveadm(pit): Debug: fs quota block device = /dev/mapper/mpath1p1 doveadm(pit): Debug: fs quota mount point = /var/spool/mail doveadm(pit): Debug: fs quota mount type = ext2 Quota name Type Value Limit % INBOX STORAGE 4824 19456 24
But don't start script quota-warning.sh:
#!/bin/sh PERCENT=$1 USER=$2 cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=fs:INBOX:mount=/var/spool/mail:noenforcing" From: postmaster@domen.org Subject: quota warning
Your mailbox is now $PERCENT% full. EOF
#dovecot -n # 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-274.3.1.el5.asp121 x86_64 Red Hat Enterprise Linux Server release 5.6 (Tikanga) disable_plaintext_auth = no listen = * log_path = /var/log/dovecot.log mail_debug = yes mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u mail_plugins = quota mail_privileged_group = mail mbox_write_locks = fcntl passdb { driver = pam } plugin { quota = fs:INBOX:mount=/var/spool/mail quota_rule = *:storage=19456 quota_warning = storage=20%% quota-warning 20 %u } protocols = pop3 service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { mode = 0666 } user = root } ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } verbose_proctitle = yes protocol lda { mail_plugins = quota } protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota }
On Tue, 2011-09-13 at 11:06 +0300, Peter Ignatov wrote:
Hi,
# doveadm -Dv quota get -u pit doveadm(pit): Debug: auth input: pit system_groups_user=pit uid=500 gid=500 home=/home/pit doveadm(pit): Debug: Effective uid=500, gid=500, home=/home/pit doveadm(pit): Debug: Quota root: name=INBOX backend=fs args=mount=/var/spool/mail doveadm(pit): Debug: Quota rule: root=INBOX mailbox=* bytes=19922944 messages=0 doveadm(pit): Debug: Quota warning: bytes=3984588 (20%) messages=0 reverse=no command=quota-warning 20 pit Quota name Type Value Limit % INBOX STORAGE 4824 19456 24
But don't start script quota-warning.sh:
Have you read (and understood) when the quota warning gets run? Just because you're over quota now doesn't mean that the script is going to be run.
http://wiki2.dovecot.org/Quota/Configuration#Quota_warnings
(It's possible that there's a bug here with FS quota since no one's probably tried it before, but it's a lot of trouble for me to actually test that..)
participants (2)
-
Peter Ignatov
-
Timo Sirainen