[Dovecot] Quota fs (don't start script quota-warning.sh)
Peter Ignatov
pit11 at ukr.net
Tue Sep 13 11:06:23 EEST 2011
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 at 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
}
More information about the dovecot
mailing list