Re: [Dovecot] IMAP QUOTA
On 28.5.2013, at 13.42, Arun Gupta wrote: > I configured imap quota on dovecot-2.0 with backend Maildir++, after > exceeding user quota the sender receiving bounce mails, Is there any way that > after exceeding user quota the mail will deliver somewhere else like user > spool area? so that after increasing quota user will get the mails. quota_full_tempfail = yes
Re: [Dovecot] IMAP QUOTA
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arun Gupta wrote: > > I read about Snarf plugin, it works if the mail already in spool > area, but I want to know whether it is possible if users quota > exceeded then instead of mail rejected it should delived to user > spool area or somewhere else. I understand and you should consider Charles' advice :-) This is something your MDA should do. Neither the Dovecot LMTP server nor the current Dovecot deliver can do so. But deliver is rather small, so you could hack it in. Or use Dovecot deliver in combination with Snarf and a MDA wrapper, e.g.: The wrapper script first checks, if the recipient is over quota, in that case use another maildrop programm, such as procmail, that delivers the message to a spool area; otherwise call Dovecot deliver with the usual arguments. Or if you call Dovecot deliver and it exits with exit code 69 (Tempfailure), call that other MDA. Then let Snarf pull the messages into the INBOX next time. - -- Steffen -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEVAwUBUadrp13r2wJMiz2NAQIpiAf+JSeuZns89NoJV5aW2Li4myLp209HycHt j3varTiBYgekw1vMAhDXYH/RKnMwWlOFSe15YIMTcCIY8gjTIqCx6YA/W1cJVZL+ 3zRVA/75t3CsAFx70/+fecrZJnY6u0Ok7VUXJ4DAxdJgsOyqXZy9/6bt+t43TcaT pUlug3nAmIP9GwZ2GQFGkEFxfD74EPVRVg8opAZzTaSPuv/IfKsC8f4RA64JtQ2S EACc/nEC4xVmjDAz/9cpLLsWiLlYfy/cEDIw49XA2MrQsIIS7qkHcDLawuqsVsAk HHXX/iqmcRBtznpO94XS9SCtvUa/5fDkVYv56uuDazEHpy4urBrtyA== =Qo2f -END PGP SIGNATURE-
Re: [Dovecot] IMAP QUOTA
On 2013-05-30 3:26 AM, Arun Gupta wrote: I read about Snarf plugin, it works if the mail already in spool area, but I want to know whether it is possible if users quota exceeded then instead of mail rejected it should delived to user spool area or somewhere else. Again, you are tilting at windmills. If you want to use Quotas, *use* them. If you don't, then *don't*. Otherwise you are just asking for headaches. -- Best regards, Charles
Re: [Dovecot] IMAP QUOTA
Hi, I read about Snarf plugin, it works if the mail already in spool area, but I want to know whether it is possible if users quota exceeded then instead of mail rejected it should delived to user spool area or somewhere else. Regards, Arun Gupta On Wed, 29 May 2013, Arun Gupta wrote: Hi, Thanks for replying... Dear Steffen I search about "slurp" plugin but didn't get it if possible kindly provde me the doc, link etc for the same. Regards, Arun Gupta On Tue, 28 May 2013, Arun Gupta wrote: I configured imap quota on dovecot-2.0 with backend Maildir++, after exceeding user quota the sender receiving bounce mails, Is there any way that after exceeding user quota the mail will deliver somewhere else like user spool area? so that after increasing quota user will get the mails. Check out the "slurp" plugin and let your MTA deliver mails to, say, /var/mail/ . You will have no Sieve rules then, I think. However, some sort of quota enforcing you will need there, too. - -- Steffen Kaiser -- Regards, Arun Kumar Gupta Mail Administrator National PARAM Supercomputing Facility (NPSF) Centre for Development of Advanced Computing Ganeshkhind Road Pune University Campus PUNE-Maharastra Phone : +91-20-25704347 WEB : http://www.cdac.in/ --- This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. ---
Re: [Dovecot] IMAP QUOTA
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 29 May 2013, Arun Gupta wrote: Dear Steffen I search about "slurp" plugin but didn't get it if possible kindly provde me the doc, link etc for the same. Um, sorry, "slurp" is the term UW-Imap uses, in Dovecot: http://wiki2.dovecot.org/Plugins/Snarf - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUaXQSF3r2wJMiz2NAQK+4ggAxfxgkVVu/4YPm/vcAm+/oqPeDOMXrhei iL9SBThzBeP5jtMqaKHLASucFn8s5Rjmwo0uFP2kTUJ+n1P6nRPh69+NhJ0kATLQ 7WSi86loNV0IJ5ZzmYmldFtL0O2tySjDX9qqVXrqwX3b5y0wtUp5RQZpFNDtQCOP LYSNKPzFnriwwcBC3ix4VoF9R9FOSy9PM9HPr2mWecsyYrUhuZ0abX99KwNEqHYm 7gfqUCjlELc+ZlcTfruNZ1Qpj84vFhzl4xiB1XJQ5nISOWRJ0T1x4Re1kjncAOFw DdCswgTsRpQ9UaIoBQpmOodqRFzfPluHBvLNkJYi+WxsL11lrPvmJA== =3pOF -END PGP SIGNATURE-
Re: [Dovecot] IMAP QUOTA
Hi, Thanks for replying... Dear Steffen I search about "slurp" plugin but didn't get it if possible kindly provde me the doc, link etc for the same. Regards, Arun Gupta On Tue, 28 May 2013, Arun Gupta wrote: I configured imap quota on dovecot-2.0 with backend Maildir++, after exceeding user quota the sender receiving bounce mails, Is there any way that after exceeding user quota the mail will deliver somewhere else like user spool area? so that after increasing quota user will get the mails. Check out the "slurp" plugin and let your MTA deliver mails to, say, /var/mail/ . You will have no Sieve rules then, I think. However, some sort of quota enforcing you will need there, too. - -- Steffen Kaiser --- This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. ---
Re: [Dovecot] IMAP QUOTA
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 28 May 2013, Arun Gupta wrote: I configured imap quota on dovecot-2.0 with backend Maildir++, after exceeding user quota the sender receiving bounce mails, Is there any way that after exceeding user quota the mail will deliver somewhere else like user spool area? so that after increasing quota user will get the mails. Check out the "slurp" plugin and let your MTA deliver mails to, say, /var/mail/ . You will have no Sieve rules then, I think. However, some sort of quota enforcing you will need there, too. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUaS6fl3r2wJMiz2NAQL0DggAnZ0zQ24cKNdrpuy+ThJ9z77H5upgcGJE b8UpHs+m42xAF3Lp5r6AZ1exyP+VT7ERaR81mL4o+hCEUiDctW0L0zekJUW+bJ9i AbgnAC8VhVBRwzJt/2N6NS9H89Hf12PDF+ws4KllLODpqfmTWhBH65PPhn3UjRlO 4ABRiH4kcXLdn+OSLKabqY6wu+hGcGCJKjDOw9+p+nZziiXcg7P1Pn3TRDO5Tghe yxxCfLzMHm3o8PH0bVnewUjirofqdqg8v+beBRPRaUs7ONAB6jG54E115ETaBQD1 gTbu3Nh4M3UdSqGW8iV+RJAqHxbTBdDlwn96H0I+EMLq5LD2i1mX8w== =TM+V -END PGP SIGNATURE-
Re: [Dovecot] IMAP QUOTA
On 2013-05-28 6:42 AM, Arun Gupta wrote: I configured imap quota on dovecot-2.0 with backend Maildir++, after exceeding user quota the sender receiving bounce mails, Is there any way that after exceeding user quota the mail will deliver somewhere else like user spool area? so that after increasing quota user will get the mails. Even if it is/was possible, it would be a really bad idea (in my opinion). If you want to use quotas, use them. Define the policy, and make sure all of your users are fully aware of the policy, and just let it be. -- Best regards, Charles
Re: [Dovecot] Imap Quota Exceeded - But Still Receiving Emails?
On 2012-01-25 17:01, Daniel L. Miller wrote: On 1/25/2012 2:01 AM, Palatine Web Support wrote: On 2012-01-25 05:38, Daniel L. Miller wrote: On 1/24/2012 8:35 AM, Palatine Web Support wrote: Here is my dovecot config: plugin { quota = maildir:User Quota quota_rule2 = Trash:storage=+100M } [..] So it picks up my set quota of 3MB but dovecot is not rejecting emails if I am over my quota. Can anyone help? Is the quota plugin being loaded? What is the output of: doveconf | grep -B 2 plug The modules are being loaded. From the log file with debugging enabled: Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Loading modules from directory: /usr/lib/dovecot/modules/imap Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Effective uid=150, gid=8, home=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota root: name=User Quota backend=dirsize args= Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota rule: root=User Quota mailbox=* bytes=3145728 messages=0 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota rule: root=User Quota mailbox=Trash bytes=104857600 messages=0 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): maildir: data=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): maildir++: root=/var/vmail/xxx.com/support, index=, control=, inbox=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Namespace : Using permissions from /var/vmail/xxx.com/support: mode=0700 gid=-1 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Disconnected: Logged out bytes=82/573 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Disconnected: Logged out bytes=269/8243 I don't know if it makes any difference, but in your config file, try changing: plugin { quota = maildir:User Quota to plugin { quota = maildir:User quota (lowercase the "quota") The quota is working fine now. The problem was I had my transport agent set to virtual when it should have been set to dovecot. Thanks.
Re: [Dovecot] Imap Quota Exceeded - But Still Receiving Emails?
On 1/25/2012 2:01 AM, Palatine Web Support wrote: On 2012-01-25 05:38, Daniel L. Miller wrote: On 1/24/2012 8:35 AM, Palatine Web Support wrote: Here is my dovecot config: plugin { quota = maildir:User Quota quota_rule2 = Trash:storage=+100M } [..] So it picks up my set quota of 3MB but dovecot is not rejecting emails if I am over my quota. Can anyone help? Is the quota plugin being loaded? What is the output of: doveconf | grep -B 2 plug The modules are being loaded. From the log file with debugging enabled: Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Loading modules from directory: /usr/lib/dovecot/modules/imap Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Module loaded: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Effective uid=150, gid=8, home=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota root: name=User Quota backend=dirsize args= Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota rule: root=User Quota mailbox=* bytes=3145728 messages=0 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Quota rule: root=User Quota mailbox=Trash bytes=104857600 messages=0 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): maildir: data=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): maildir++: root=/var/vmail/xxx.com/support, index=, control=, inbox=/var/vmail/xxx.com/support Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Namespace : Using permissions from /var/vmail/xxx.com/support: mode=0700 gid=-1 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Disconnected: Logged out bytes=82/573 Jan 25 09:59:58 mail dovecot: IMAP(x...@xxx.com): Disconnected: Logged out bytes=269/8243 I don't know if it makes any difference, but in your config file, try changing: plugin { quota = maildir:User Quota to plugin { quota = maildir:User quota (lowercase the "quota") -- Daniel
Re: [Dovecot] Imap Quota Exceeded - But Still Receiving Emails?
On 1/25/2012 1:39 AM, Palatine Web Support wrote: On 2012-01-25 05:38, Daniel L. Miller wrote: On 1/24/2012 8:35 AM, Palatine Web Support wrote: Here is my dovecot config: plugin { quota = maildir:User Quota quota_rule2 = Trash:storage=+100M } [..] So it picks up my set quota of 3MB but dovecot is not rejecting emails if I am over my quota. Can anyone help? Is the quota plugin being loaded? What is the output of: doveconf | grep -B 2 plug Hi Daniel I tried the command and it returned the command was not found. I have installed: apt-get install dovecot-common apt-get install dovecot-dev apt-get install dovecot-imapd Which package does the binary doveconf come from? You need to make sure to reply to the list - not just to me. If you don't have doveconf...what version of Dovecot are you using? -- Daniel
Re: [Dovecot] Imap Quota Exceeded - But Still Receiving Emails?
On 1/24/2012 8:35 AM, Palatine Web Support wrote: Here is my dovecot config: plugin { quota = maildir:User Quota quota_rule2 = Trash:storage=+100M } [..] So it picks up my set quota of 3MB but dovecot is not rejecting emails if I am over my quota. Can anyone help? Is the quota plugin being loaded? What is the output of: doveconf | grep -B 2 plug -- Daniel
Re: [Dovecot] imap quota makes the Alarm clock expire
Well, I don't think it matter. Although I'm not sure that I've configured backend properly and I don't know if one backend excludes the others (i.e. they may be loaded anyway). I've tried with three different backend (not at the same time): plugin { quota = fs:user } plugin { quota = dirsize:user quota_rule = *:storage=1024M } plugin { quota = maildir:storage=10240:ignore=Trash } All three variants gives me the same behaviour. /Magnus 12 dec 2008 kl. 16.13 skrev Timo Sirainen: On Dec 12, 2008, at 5:06 PM, Magnus Appelquist wrote: After a couple of seconds when I try to start dovceot, I get this: r...@taleira:~# /etc/init.d/dovecot start Alarm clock If I uncomment the "imap_quota and quota" in dovecot.conf everything seem to work fine What quota backend are you using? fs or maildir? wait4(-1, 0xffbd7e9c, 0, NULL) = ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- +++ killed by SIGALRM +++ Dovecot doesn't have any calls to send SIGALRM signals.. If you're using fs quota with NFS rpc calls, that could cause it I guess, although I don't really understand why the signal would be sent to master process instead of just the child process.
Re: [Dovecot] imap quota makes the Alarm clock expire
On Dec 12, 2008, at 5:06 PM, Magnus Appelquist wrote: After a couple of seconds when I try to start dovceot, I get this: r...@taleira:~# /etc/init.d/dovecot start Alarm clock If I uncomment the "imap_quota and quota" in dovecot.conf everything seem to work fine What quota backend are you using? fs or maildir? wait4(-1, 0xffbd7e9c, 0, NULL) = ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- +++ killed by SIGALRM +++ Dovecot doesn't have any calls to send SIGALRM signals.. If you're using fs quota with NFS rpc calls, that could cause it I guess, although I don't really understand why the signal would be sent to master process instead of just the child process. PGP.sig Description: This is a digitally signed message part
Re: [Dovecot] imap-quota not working
On Sun, 2008-10-05 at 17:55 +0300, arvids wrote: > On Sunday 05 October 2008 17:15:45 Timo Sirainen wrote: > > That's the point of using prefetch userdb. Either don't use it, or copy > > all the quota_* fields to password_query as well (with userdb_ prefix). > > Thank you very much for pointing it out, I forgot about this prefetch thing. > Now imap quota is working, but there is some problem: > > Oct 5 17:44:09 host dovecot: Panic: IMAP(testuser): file mail-index-sync.c: > line 411 (mail_index_sync_begin_to): assertion failed: (!index->syncing) Fixed: http://hg.dovecot.org/dovecot-1.1/rev/5c905af004aa signature.asc Description: This is a digitally signed message part
Re: [Dovecot] imap-quota not working
On Sun, 2008-10-05 at 17:55 +0300, arvids wrote: > On Sunday 05 October 2008 17:15:45 Timo Sirainen wrote: > > That's the point of using prefetch userdb. Either don't use it, or copy > > all the quota_* fields to password_query as well (with userdb_ prefix). > > Thank you very much for pointing it out, I forgot about this prefetch thing. > Now imap quota is working, but there is some problem: Hmm. I'll have to think about how to fix this. The problem is that mailbox syncing triggers quota recalculation because the quota isn't in the database yet. The quota recalculation then traverses all mailboxes and syncs them. Eventually it reaches the mailbox that triggered the quota recalculation and then it crashes (so it wouldn't go to infinite loop).. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] imap-quota not working
On Sunday 05 October 2008 17:15:45 Timo Sirainen wrote: > That's the point of using prefetch userdb. Either don't use it, or copy > all the quota_* fields to password_query as well (with userdb_ prefix). Thank you very much for pointing it out, I forgot about this prefetch thing. Now imap quota is working, but there is some problem: Oct 5 17:44:09 host dovecot: Panic: IMAP(testuser): file mail-index-sync.c: line 411 (mail_index_sync_begin_to): assertion failed: (!index->syncing) Oct 5 17:44:09 host dovecot: IMAP(testuser): Raw backtrace: imap [0x80cbdcc] -> imap [0x80cc582] -> imap [0x80cbf28] -> imap [0x80ad33c] -> imap(mail_index_sync_begin+0x24) [0x80acfb4] -> imap(maildir_sync_index_begin+0x3f) [0x807021f] -> imap [0x806fc03] -> imap(maildir_storage_sync_init+0x57) [0x806fd97] -> imap(mailbox_sync_init+0x11) [0x809e421] -> imap(mailbox_sync+0x16 ) [0x809e496] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7dfbe89] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7dfc011] -> /usr/local/dovecot/lib/d ovecot/imap/lib10_quota_plugin.so(quota_count+0x78) [0xb7dfc0b8] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7dfd0eb] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota _plugin.so [0xb7dfd29e] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so(quota_get_resource+0x4c) [0xb7dfb4bc] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7 dfb8ff] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so(quota_tr Oct 5 17:44:09 host dovecot: IMAP(testuser): ocal/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7dffb18] -> /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so [0xb7dffbc9] -> i map(maildir_sync_index+0x767) [0x8070bf7] -> imap [0x806fba0] -> imap(maildir_storage_sync_init+0x57) [0x806fd97] -> imap(mailbox_sync_init+0x11) [0x809e421] -> imap(imap_sync_init+0x41) [0 x80659a1] -> imap [0x8066090] -> imap(cmd_sync_delayed+0x8d) [0x806638d] -> imap [0x806047f] Oct 5 17:44:09 host dovecot: child 21618 (imap) killed with signal 6 This crash happens every time, when message count quota is reached and I am trying to delete all messages. Regards, Arvids
Re: [Dovecot] imap-quota not working
On Sun, 2008-10-05 at 17:02 +0300, arvids wrote: > For some reason the user_query is not executed, only password_query. That's the point of using prefetch userdb. Either don't use it, or copy all the quota_* fields to password_query as well (with userdb_ prefix). signature.asc Description: This is a digitally signed message part
Re: [Dovecot] imap-quota not working
On Sunday 05 October 2008 16:47:26 Timo Sirainen wrote: > It doesn't show anything about quota rules, so the quota_rule isn't > being specified correctly by your userdb. Show your dovecot-sql.conf, > enable auth_debug=yes and show what the logs say when logging in. the log says: Oct 5 16:55:44 host dovecot: auth(default): client in: AUTH^I1^IPLAIN^Iservice=imap^Ilip=x.x.x.x^Irip=x.x.x.x^Ilport=143^Irport=49910^Iresp= Oct 5 16:55:44 host dovecot: auth(default): cache(testuser,x.x.x.x): miss Oct 5 16:55:44 host dovecot: auth-worker(default): sql(testuser,x.x.x.x): query: SELECT user, clear as password, home as userdb_home, uid as userdb_uid, gid as userdb_gid FROM users WHERE user = 'testuser' Oct 5 16:55:44 host dovecot: auth(default): client out: OK^I1^Iuser=testuser Oct 5 16:55:44 host dovecot: auth(default): master in: REQUEST^I1^I19559^I1 Oct 5 16:55:44 host dovecot: auth(default): prefetch(testuser,x.x.x.x): success Oct 5 16:55:44 host dovecot: auth(default): master out: USER^I1^Itestuser^Ihome=/var/vmail/testuser^Iuid=95^Igid=95 Oct 5 16:55:44 host dovecot: imap-login: Login: user=, method=PLAIN, rip=x.x.x.x, lip=x.x.x.x Oct 5 16:55:44 host dovecot: auth(default): new auth connection: pid=19559 Oct 5 16:55:44 host dovecot: IMAP(testuser): Loading modules from directory: /usr/local/dovecot/lib/dovecot/imap Oct 5 16:55:44 host dovecot: IMAP(testuser): Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Oct 5 16:55:44 host dovecot: IMAP(testuser): Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so Oct 5 16:55:44 host dovecot: IMAP(testuser): Effective uid=95, gid=95, home=/var/vmail/testuser Oct 5 16:55:44 host dovecot: IMAP(testuser): Quota root: name= backend=dict args=:proxy:/var/run/dovecot/dict-server:quotadict Oct 5 16:55:44 host dovecot: IMAP(testuser): dict quota: user=testuser, uri=proxy:/var/run/dovecot/dict-server:quotadict, enforcing=0 Oct 5 16:55:44 host dovecot: IMAP(testuser): Namespace: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Oct 5 16:55:44 host dovecot: IMAP(testuser): maildir: data=/var/vmail/testuser/Maildir Oct 5 16:55:44 host dovecot: IMAP(testuser): maildir++: root=/var/vmail/testuser/Maildir, index=, control=, inbox=/var/vmail/testuser/Maildir Oct 5 16:55:47 host dovecot: dict: mysql: Connected to /tmp/mysql.sock (mail) Oct 5 16:55:53 host dovecot: IMAP(testuser): Disconnected: Logged out bytes=24/85 For some reason the user_query is not executed, only password_query. Here is my dovecot-sql.conf: --- driver = mysql connect = host=/tmp/mysql.sock dbname=mail user=dovecot password=xxx default_pass_scheme = PLAIN password_query = SELECT user, clear as password, home as userdb_home, uid as userdb_uid, gid as userdb_gid \ FROM users WHERE user = '%u' user_query = SELECT home, uid, gid, \ concat('*:storage=',quota_kb,':messages=',quota_num) AS quota_rule,\ concat('storage=',round(quota_kb*0.90),' /etc/postfix/quotawarn.sh storage 90') AS quota_warning, \ concat('messages=',round(quota_num*0.90),' /etc/postfix/quotawarn.sh messages 90') AS quota_warning2 \ FROM users WHERE user = '%u' --- Regards, Arvids
Re: [Dovecot] imap-quota not working
On Sun, 2008-10-05 at 16:42 +0300, arvids wrote: > On Sunday 05 October 2008 15:15:49 Timo Sirainen wrote: > > You should have only one quota_rule that's > > '*:storage=500:messages=5' > > > > I'm not sure what it does with your configuration. I suppose it's also > > possible that it works as intended.. > > > > Anyway, set mail_debug=yes and show what the logs say when logging in. > > That'll describe what it really sees in the quota settings. > > with mail_debug=yes the log says : > Oct 5 16:23:01 host dovecot: IMAP(testuser): Loading modules from directory: > /usr/local/dovecot/lib/dovecot/imap > Oct 5 16:23:01 host dovecot: IMAP(testuser): Module loaded: > /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so > Oct 5 16:23:01 host dovecot: IMAP(testuser): Module loaded: > /usr/local/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so > Oct 5 16:23:01 host dovecot: IMAP(testuser): Effective uid=95, gid=95, > home=/var/vmail/testuser > Oct 5 16:23:01 host dovecot: IMAP(testuser): Quota root: name= backend=dict > args=:proxy:/var/run/dovecot/dict-server:quotadict > Oct 5 16:23:01 host dovecot: IMAP(testuser): dict quota: user=testuser, > uri=proxy:/var/run/dovecot/dict-server:quotadict, enforcing=0 > Oct 5 16:23:01 host dovecot: IMAP(testuser): Namespace: type=private, > prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes > Oct 5 16:23:01 host dovecot: IMAP(testuser): maildir: > data=/var/vmail/testuser/Maildir > Oct 5 16:23:01 host dovecot: IMAP(testuser): maildir++: > root=/var/vmail/testuser/Maildir, index=, control=, > inbox=/var/vmail/testuser/Maildir > Oct 5 16:23:01 host dovecot: imap-login: Login: user=, > method=PLAIN, rip=x.x.x.x, lip=x.x.x.x > > exactly the same result with quota_rule='*:storage=500:messages=5'. It doesn't show anything about quota rules, so the quota_rule isn't being specified correctly by your userdb. Show your dovecot-sql.conf, enable auth_debug=yes and show what the logs say when logging in. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] imap-quota not working
On Sunday 05 October 2008 15:15:49 Timo Sirainen wrote: > You should have only one quota_rule that's > '*:storage=500:messages=5' > > I'm not sure what it does with your configuration. I suppose it's also > possible that it works as intended.. > > Anyway, set mail_debug=yes and show what the logs say when logging in. > That'll describe what it really sees in the quota settings. with mail_debug=yes the log says : Oct 5 16:23:01 host dovecot: IMAP(testuser): Loading modules from directory: /usr/local/dovecot/lib/dovecot/imap Oct 5 16:23:01 host dovecot: IMAP(testuser): Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Oct 5 16:23:01 host dovecot: IMAP(testuser): Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so Oct 5 16:23:01 host dovecot: IMAP(testuser): Effective uid=95, gid=95, home=/var/vmail/testuser Oct 5 16:23:01 host dovecot: IMAP(testuser): Quota root: name= backend=dict args=:proxy:/var/run/dovecot/dict-server:quotadict Oct 5 16:23:01 host dovecot: IMAP(testuser): dict quota: user=testuser, uri=proxy:/var/run/dovecot/dict-server:quotadict, enforcing=0 Oct 5 16:23:01 host dovecot: IMAP(testuser): Namespace: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Oct 5 16:23:01 host dovecot: IMAP(testuser): maildir: data=/var/vmail/testuser/Maildir Oct 5 16:23:01 host dovecot: IMAP(testuser): maildir++: root=/var/vmail/testuser/Maildir, index=, control=, inbox=/var/vmail/testuser/Maildir Oct 5 16:23:01 host dovecot: imap-login: Login: user=, method=PLAIN, rip=x.x.x.x, lip=x.x.x.x exactly the same result with quota_rule='*:storage=500:messages=5'. Regards, Arvids
Re: [Dovecot] imap-quota not working
On Fri, 2008-09-26 at 11:43 +0300, arvids wrote: > Hello, > > imap-quota plugin always returns empty quota: > a1 GETQUOTA "" > * QUOTA "" () > a1 OK Getquota completed. > a2 GETQUOTAROOT INBOX > * QUOTAROOT "INBOX" > a2 OK Getquotaroot completed. > > quota_rule and quota_rule2 for this user are defined in db as following: > '*:storage=500' > '*:messages=5' You should have only one quota_rule that's '*:storage=500:messages=5' I'm not sure what it does with your configuration. I suppose it's also possible that it works as intended.. Anyway, set mail_debug=yes and show what the logs say when logging in. That'll describe what it really sees in the quota settings. signature.asc Description: This is a digitally signed message part