Hi, I set "quota: fs:INBOX:noenforcing:mount=/var/spool/mail", but receive: "fs quota add storage dir = /home/pit/mail"... Why ? In fstab: /dev/mapper/mpath1p1 /var/spool/mail ext2 usrquota 0 0 In dovecot.log: Sep 06 15:02:00 pop3-login: Info: Login: user=<pit>, method=PLAIN, rip=192.168.3.10, lip=192.168.6.3, TLS Sep 06 15:02:00 POP3(pit): Info: Loading modules from directory: /usr/lib64/dovecot/pop3 Sep 06 15:02:00 POP3(pit): Info: Module loaded: /usr/lib64/dovecot/pop3/lib10_quota_plugin.so Sep 06 15:02:00 POP3(pit): Info: Effective uid=500, gid=500, home=/home/pit Sep 06 15:02:00 POP3(pit): Info: Quota root: name=INBOX backend=fs args=noenforcing:mount=/var/spool/mail Sep 06 15:02:00 POP3(pit): Info: Quota rule: root=INBOX mailbox=* bytes=10485760 messages=0 Sep 06 15:02:00 POP3(pit): Info: Quota warning: bytes=9961472 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Sep 06 15:02:00 POP3(pit): Info: mbox: data=~/mail:INBOX=/var/spool/mail/pit Sep 06 15:02:00 POP3(pit): Info: fs: root=/home/pit/mail, index=, control=, inbox=/var/spool/mail/pit Sep 06 15:02:00 POP3(pit): Info: fs quota add storage dir = /home/pit/mail Sep 06 15:02:00 POP3(pit): Info: fs quota block device = /dev/cciss/c0d0p3 Sep 06 15:02:00 POP3(pit): Info: fs quota mount point = / Sep 06 15:02:00 POP3(pit): Info: fs quota mount type = ext3 Sep 06 15:02:01 POP3(pit): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=1249 dovecot --version 1.2.17 dovecot -n # 1.2.17: /etc/dovecot.conf # OS: Linux 2.6.18-274.el5.asp121 x86_64 Red Hat Enterprise Linux Server release 5.6 (Tikanga) log_path: /var/log/dovecot.log protocols: pop3 pop3s listen: * login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/pop3-login verbose_proctitle: yes mail_location: mbox:~/mail:INBOX=/var/spool/mail/%u mail_debug: yes mail_executable: /usr/libexec/dovecot/pop3 mail_plugins: quota mail_plugin_dir: /usr/lib64/dovecot/pop3 auth default: passdb: driver: pam userdb: driver: passwd plugin: quota: fs:INBOX:noenforcing:mount=/var/spool/mail quota_rule: *:storage=10240 quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95
On 6.9.2011, at 15.11, Peter Ignatov wrote:> I set "quota: fs:INBOX:noenforcing:mount=/var/spool/mail", but receive: "fs quota add storage dir = /home/pit/mail"... > Why ?Well .. I'm not entirely sure if the current behavior is good or not, but what you need to do to get it working is to add two quota roots. One for /home/pit/mail (i.e. without specifying mount=) and another for the INBOX's /var/spool/mail.
> I set "quota: fs:INBOX:noenforcing:mount=/var/spool/mail", but receive: "fs quota add storage dir = /home/pit/mail"... > Why ?Well .. I'm not entirely sure if the current behavior is good or not, but what you need to do to get it working is to add two quota roots. One for /home/pit/mail (i.e. without specifying mount=) and another for the INBOX's /var/spool/mail. Don't work... :-( # dovecot -n # 1.2.17: /etc/dovecot.conf # OS: Linux 2.6.18-274.el5.asp121 x86_64 Red Hat Enterprise Linux Server release 5.6 (Tikanga) log_path: /var/log/dovecot.log protocols: pop3 pop3s listen: * login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/pop3-login verbose_proctitle: yes mail_location: mbox:~/mail:INBOX=/var/spool/mail/%u mail_debug: yes mail_executable: /usr/libexec/dovecot/pop3 mail_plugins: quota mail_plugin_dir: /usr/lib64/dovecot/pop3 auth default: passdb: driver: pam userdb: driver: passwd plugin: quota: fs:INBOX:noenforcing quota2: fs:boxes:noenforcing:mount=/var/spool/mail quota_rule: *:storage=10240 quota_rule2: *:storage=15000 dovecot.log: ------------ Sep 09 16:13:46 pop3-login: Info: Login: user=<pit>, method=PLAIN, rip=192.168.3.10, lip=192.168.6.3, TLS Sep 09 16:13:46 POP3(pit): Info: Loading modules from directory: /usr/lib64/dovecot/pop3 Sep 09 16:13:46 POP3(pit): Info: Module loaded: /usr/lib64/dovecot/pop3/lib10_quota_plugin.so Sep 09 16:13:46 POP3(pit): Info: Effective uid=500, gid=500, home=/home/pit Sep 09 16:13:46 POP3(pit): Info: Quota root: name=INBOX backend=fs args=noenforcing Sep 09 16:13:46 POP3(pit): Info: Quota rule: root=INBOX mailbox=* bytes=10485760 messages=0 Sep 09 16:13:46 POP3(pit): Info: Quota rule: root=INBOX mailbox=* bytes=15360000 messages=0 Sep 09 16:13:46 POP3(pit): Info: Quota root: name=boxes backend=fs args=noenforcing:mount=/var/spool/mail Sep 09 16:13:46 POP3(pit): Info: mbox: data=~/mail:INBOX=/var/spool/mail/pit Sep 09 16:13:46 POP3(pit): Info: fs: root=/home/pit/mail, index=, control=, inbox=/var/spool/mail/pit Sep 09 16:13:46 POP3(pit): Info: fs quota add storage dir = /home/pit/mail Sep 09 16:13:46 POP3(pit): Info: fs quota block device = /dev/cciss/c0d0p3 Sep 09 16:13:46 POP3(pit): Info: fs quota mount point = / Sep 09 16:13:46 POP3(pit): Info: fs quota mount type = ext3 Sep 09 16:13:46 POP3(pit): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=1249
>> Well .. I'm not entirely sure if the current behavior is good or not, but what you need to do to get it working is to add two quota roots. One for /home/pit/mail (i.e. without specifying mount=) and another for the INBOX's /var/spool/mail.> Don't work... :-(After I installed version 2.0.13 - mount is correct: # 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 now don't work 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 }