[Dovecot] Per-user quotas aren't working
Hello
I tried to get per-user quotas working. The global quota is working well, but I can't get the one work on my test user: dovecot -n # 1.1.20: /etc/dovecot.conf # OS: Linux 2.6.18-164.el5 i686 Red Hat Enterprise Linux Server release 5.4 (Tikanga) log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.info.log protocols: pop3 login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/pop3-login login_greeting: test-POP3 READY mail_location: maildir:~/Maildir mail_executable: /usr/libexec/dovecot/pop3 mail_plugins: quota mail_plugin_dir: /usr/lib/dovecot/pop3 pop3_client_workarounds: outlook-no-nuls oe-ns-eoh lda: postmaster_address: grog@test.mymail.srv mail_plugins: quota auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: passwd-file args: /etc/password.pop3 userdb: driver: passwd-file args: /etc/password.pop3 plugin: quota: maildir:User quota quota_rule: *:storage=10M quota_rule2: Trash:storage=1M
with users line in my password.pop3 like this: test-oper:{plain}test-oper:501:501::/home/test-oper::userdb_quota_rule=*:bytes=2 0M allow_nets=192.168.4.0/24
I know that this file is well understood since the allow_nets works well. But I don't know why, the specific user quota rule isn't taken. I also use the Dovecot deliver process.
Here is the info log: dovecot: Jul 02 12:55:32 Info: auth(default): passwd-file(test-oper,192.168.4.239): lookup: user=test-oper file=/etc/password.pop3 dovecot: Jul 02 12:55:32 Info: auth(default): auth(test-oper,192.168.4.239): allow_nets: Matching for network 192.168.4.0/24 dovecot: Jul 02 12:55:32 Info: auth(default): client out: OK 1 user=test-oper dovecot: Jul 02 12:55:32 Info: auth(default): master in: REQUEST 1 4521 1 dovecot: Jul 02 12:55:32 Info: auth(default): passwd-file(test-oper,192.168.4.239): lookup: user=test-oper file=/etc/password.pop3 dovecot: Jul 02 12:55:32 Info: auth(default): master out: USER 1 test-oper uid=501 gid=501 home=/home/test-oper quota_rule=*:bytes=20M dovecot: Jul 02 12:55:32 Info: pop3-login: Login: user=<test-oper>, method=PLAIN, rip=192.168.4.239, lip=192.168.4.239, secured deliver(test-oper): Jul 02 12:55:47 Info: msgid=11c5.0003.0000@test.mymail.srv: save failed to INBOX: Quota exceeded (mailbox for user is full) deliver(test-oper): Jul 02 12:55:47 Info: msgid=11c5.0003.0000@test.mymail.srv: rejected: Quota exceeded (mailbox for user is full) deliver(grog): Jul 02 12:55:47 Info: msgid=dovecot-1278068147-645784-0@test.mymail.srv: saved mail to INBOX dovecot: Jul 02 12:56:13 Info: POP3(test-oper): Disconnected: Logged out top=0/0, retr=0/0, del=0/15, size=13816325
The corresponding maildirsize still show the global quota, and not the "test-oper" one: more /home/test-oper/Maildir/maildirsize 10485760S 13643547 15
I also tried to delete it, restart dovecot service, the result is the same.
Do you have any idea?
Guillaume
On Fri, 2010-07-02 at 12:18 +0000, Guillaume CHARREYRON wrote:
dovecot: Jul 02 12:55:32 Info: auth(default): master out: USER 1 test-oper uid=501 gid=501 home=/home/test-oper quota_rule=*:bytes=20M
Looks ok. The user should have 20 MB quota.
dovecot: Jul 02 12:55:32 Info: pop3-login: Login: user=<test-oper>, method=PLAIN, rip=192.168.4.239, lip=192.168.4.239, secured deliver(test-oper): Jul 02 12:55:47 Info: msgid=11c5.0003.0000@test.mymail.srv: save failed to INBOX: Quota exceeded (mailbox for user is full)
Looks like you're not calling deliver with -d parameter? Then it's not doing userdb lookup.
Well, I just put it in Postfix, like it is said in Dovecot Wiki: mailbox_command = /usr/libexec/dovecot/deliver
because I do use system users for postfix too, I have no virtual users. deliver -d in postfix is only for virtual users, which I can't use. Is there another way?
--- En date de : Ven 2.7.10, Timo Sirainen tss@iki.fi a écrit :
De: Timo Sirainen tss@iki.fi Objet: Re: [Dovecot] Per-user quotas aren't working À: "Guillaume CHARREYRON" gcharreyron@yahoo.fr Cc: dovecot@dovecot.org Date: Vendredi 2 juillet 2010, 14h28 On Fri, 2010-07-02 at 12:18 +0000, Guillaume CHARREYRON wrote:
dovecot: Jul 02 12:55:32 Info: auth(default): master out: USER 1 test-oper uid=501 gid=501 home=/home/test-oper quota_rule=*:bytes=20M
Looks ok. The user should have 20 MB quota.
dovecot: Jul 02 12:55:32 Info: pop3-login: Login: user=<test-oper>, method=PLAIN, rip=192.168.4.239, lip=192.168.4.239, secured deliver(test-oper): Jul 02 12:55:47 Info: msgid=11c5.0003.0000@test.mymail.srv: save failed to INBOX: Quota exceeded (mailbox for user is full)
Looks like you're not calling deliver with -d parameter? Then it's not doing userdb lookup.
On Fri, 2010-07-02 at 12:58 +0000, Guillaume CHARREYRON wrote:
Well, I just put it in Postfix, like it is said in Dovecot Wiki: mailbox_command = /usr/libexec/dovecot/deliver
because I do use system users for postfix too, I have no virtual users. deliver -d in postfix is only for virtual users, which I can't use. Is there another way?
-d isn't only for virtual users. It's just not usually required for system users, because they don't usually need a userdb lookup. But you do need it. So add -d ${user} or something to mailbox_command. Also you need to make sure that it has enough permissions to access the auth-master socket (and if it doesn't exist yet, create it as described in http://wiki.dovecot.org/LDA).
participants (2)
-
Guillaume CHARREYRON
-
Timo Sirainen