[Dovecot] Quota & expire problem
I have managed to get the master quota working, but cannot get individual user quota to do anything.
Here is a line from /etc/dovecot/passwd: _kari@karico.ca:XXXXXXXXX:502:502::/var/mail/vhosts/karico.ca/kari::userdb_quota_rule=*:bytes=600M_
Also, based on this, the expire cron job says: Unknown dict module: db
# 1.1.6: /etc/dovecot.conf # OS: Linux 2.6.18-92.1.18.el5.centos.plusxen i686 CentOS release 5.2 (Final) log_path: /var/log/dovecot/dovecot.log info_log_path: /var/log/dovecot/dovecot.log protocols: imap pop3 imaps pop3s listen: 209.222.57.19 ssl_listen: 209.222.57.19 verbose_ssl: yes login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_greeting: mail.karico.ca ready. login_greeting_capability: yes verbose_proctitle: yes mail_access_groups: virtual mail_location: maildir:~/Maildir mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth external: verbose: yes debug: yes debug_passwords: yes socket: type: connect master: path: /var/run/dovecot/auth-master mode: 384 auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: passwd-file args: /etc/dovecot/passwd userdb: driver: static args: uid=virtual gid=virtual home=/var/mail/vhosts/%d/%n socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: Trash:storage=20%% quota_rule3: Spam:storage=30%% quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=70%% /usr/local/bin/quota-warning.sh 70 expire: Trash 7 Spam 30 expire_dict: db:/var/lib/dovecot/expire.db dict: expire: db:/var/lib/dovecot/expire.db
On Sun, 2008-11-30 at 17:58 -0500, Kari Suomela (DC) wrote:
I have managed to get the master quota working, but cannot get individual user quota to do anything.
Here is a line from /etc/dovecot/passwd: _kari@karico.ca:XXXXXXXXX:502:502::/var/mail/vhosts/karico.ca/kari::userdb_quota_rule=*:bytes=600M_
The _ prefix and suffix isn't probably really in there? Anyway looks correct. Set mail_debug=yes and auth_debug=yes to see if quota_rule gets transferred correctly to imap process.
Also, based on this, the expire cron job says: Unknown dict module: db .. expire: Trash 7 Spam 30 expire_dict: db:/var/lib/dovecot/expire.db dict: expire: db:/var/lib/dovecot/expire.db
Berkeley DB support isn't linked to imap processes. You'll need to configure it to use dict proxy like the example shows: http://wiki.dovecot.org/Plugins/Expire
On 30/11/2008 19:37 Timo Sirainen wrote:
On Sun, 2008-11-30 at 17:58 -0500, Kari Suomela (DC) wrote:
I have managed to get the master quota working, but cannot get individual user quota to do anything.
Here is a line from /etc/dovecot/passwd: kari@karico.ca:XXXXXXXXX:502:502::/var/mail/vhosts/karico.ca/kari::userdb_quota_rule=*:bytes=600M
Anyway looks correct. Set mail_debug=yes and auth_debug=yes to see if quota_rule gets transferred correctly to imap process.
I do not see anything about the passwd file line being read:
dovecot: Nov 30 21:55:13 Info: imap-login: Login: user=kari@karico.ca, method=PLAIN, rip=209.222.57.22, lip=209.222.57.19, TLS dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Loading modules from directory: /usr/lib/dovecot/imap dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Module loaded: /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Effective uid=502, gid=502, home=/var/mail/vhosts/karico.ca/kari dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota root: name=User quota backend=maildir args= dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota rule: root=User quota mailbox=* bytes=1073741824 (0%) messages=0 (0%) dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota rule: root=User quota mailbox=Trash bytes=214748364 (20%) messages=0 (0%) dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota rule: root=User quota mailbox=Spam bytes=322122547 (30%) messages=0 (0%) dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota warning: bytes=1020054732 (95%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 95 dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Quota warning: bytes=751619276 (70%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 70 dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): maildir: data=~/Maildir dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): maildir++: root=/var/mail/vhosts/karico.ca/kari/Maildir, index=, control=, inbox=/var/mail/vhosts/karico.ca/kari/Maildir dovecot: Nov 30 21:55:13 Info: IMAP(kari@karico.ca): Disconnected: Logged out bytes=39/132
On Dec 1, 2008, at 5:08 AM, Kari Suomela (DC) wrote:
On 30/11/2008 19:37 Timo Sirainen wrote:
On Sun, 2008-11-30 at 17:58 -0500, Kari Suomela (DC) wrote:
I have managed to get the master quota working, but cannot get
individual user quota to do anything.Here is a line from /etc/dovecot/passwd: kari@karico.ca:XXXXXXXXX:502:502::/var/mail/vhosts/karico.ca/ kari::userdb_quota_rule=*:bytes=600M
Anyway looks correct. Set mail_debug=yes and auth_debug=yes to see if quota_rule
gets transferred correctly to imap process.I do not see anything about the passwd file line being read:
Actually now that I look at your dovecot -n output:
passdb: driver: passwd-file args: /etc/dovecot/passwd userdb: driver: static args: uid=virtual gid=virtual home=/var/mail/vhosts/%d/%n
You're using userdb static, so Dovecot looks up only user/password
from the passwd-file. Use userdb passwd-file.
On 01/12/2008 06:05 Timo Sirainen wrote:
Actually now that I look at your dovecot -n output:
passdb: driver: passwd-file args: /etc/dovecot/passwd userdb: driver: static args: uid=virtual gid=virtual home=/var/mail/vhosts/%d/%n
You're using userdb static, so Dovecot looks up only user/password from the passwd-file. Use userdb passwd-file.
Thanks! Now quotas work, but quota warning messages are not being sent.:(
KS
Now I got quotas working and under control, but can't get quota-warning.sh to run. I tried to fire it by reducing my won quota, but nothing happens. Should the command go to passwd-file somehow?
KS
# 1.1.6: /etc/dovecot.conf # OS: Linux 2.6.18-92.1.18.el5.centos.plusxen i686 CentOS release 5.2 (Final) log_path: /var/log/dovecot/dovecot.log info_log_path: /var/log/dovecot/dovecot.log protocols: imap pop3 imaps pop3s listen: 209.222.57.19 ssl_listen: 209.222.57.19 verbose_ssl: yes login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_greeting: mail.karico.ca ready. login_greeting_capability: yes verbose_proctitle: yes mail_access_groups: virtual mail_location: maildir:~/Maildir mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota expire mail_plugins(imap): quota imap_quota expire mail_plugins(pop3): quota expire mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth external: verbose: yes debug: yes debug_passwords: yes socket: type: connect master: path: /var/run/dovecot/auth-master mode: 384 auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: passwd-file args: /etc/dovecot/passwd userdb: driver: passwd-file args: /etc/dovecot/passwd socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: maildir:User quota quota_rule: *:storage=1G quota_rule2: Trash:storage=20%% quota_rule3: Spam:storage=30%% expire: Trash 7 Trash/* 7 Spam 30 expire_dict: proxy::expire quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=70%% /usr/local/bin/quota-warning.sh 70 dict: expire: db:/var/lib/dovecot/expire.db
On Mon, 2008-12-01 at 18:48 -0500, Kari Suomela (DC) wrote:
Now I got quotas working and under control, but can't get quota-warning.sh to run. I tried to fire it by reducing my won quota, but nothing happens. Should the command go to passwd-file somehow?
The quota warning is triggered at the exact moment when saving a mail brings the quota over the warning threshold. It doesn't keep any track of when warnings have been sent, so simply reducing the quota doesn't trigger it.
On 01/12/2008 20:36 Timo Sirainen wrote:
On Mon, 2008-12-01 at 18:48 -0500, Kari Suomela (DC) wrote:
Now I got quotas working and under control, but can't get quota-warning.sh to run. I tried to fire it by reducing my won quota, but nothing happens. Should the command go to passwd-file somehow?
The quota warning is triggered at the exact moment when saving a mail brings the quota over the warning threshold. It doesn't keep any track of when warnings have been sent, so simply reducing the quota doesn't trigger it.
Hmmm... Is there any way to test it?
KS
On Mon, 2008-12-01 at 20:41 -0500, Kari Suomela (DC) wrote:
On 01/12/2008 20:36 Timo Sirainen wrote:
On Mon, 2008-12-01 at 18:48 -0500, Kari Suomela (DC) wrote:
Now I got quotas working and under control, but can't get quota-warning.sh to run. I tried to fire it by reducing my won quota, but nothing happens. Should the command go to passwd-file somehow?
The quota warning is triggered at the exact moment when saving a mail brings the quota over the warning threshold. It doesn't keep any track of when warnings have been sent, so simply reducing the quota doesn't trigger it.
Hmmm... Is there any way to test it?
Not any other way than triggering it like I explained above. You could change quota warning limit or quota limit and then send a large enough mail that brings the quota usage over the warning limit (or simply send many huge mails that quickly bring usage over the warning limit).
On 01/12/2008 22:51 Timo Sirainen wrote:
The quota warning is triggered at the exact moment when saving a mail brings the quota over the warning threshold. It doesn't keep any track of when warnings have been sent, so simply reducing the quota doesn't trigger it.
Hmmm... Is there any way to test it?
Not any other way than triggering it like I explained above. You could change quota warning limit or quota limit and then send a large enough mail that brings the quota usage over the warning limit (or simply send many huge mails that quickly bring usage over the warning limit).
That is exactly what I did, and it works fine.
Hyvää loppuvuotta ja ... joulua!;)
KS
participants (2)
-
Kari Suomela (DC)
-
Timo Sirainen