[Dovecot] quota-rewrite patch & userdb quota overriding

Alan Premselaar alien at 12inch.com
Thu Jun 12 08:36:19 EEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

on 6/11/08 10:02 PM Timo Sirainen said the following:
| On Wed, 2008-06-11 at 15:59 +0900, Alan Premselaar wrote:
|> prior to the quota-rewrite patch (which i installed with the hopes of
|> using quota_warn feature) i was able to put the following line into my
|> passwd-file userdb and it was working:
|>
|>
alan:*:1000:1000::/home/alan::userdb_quota=maildir:storeage=2048000:ignore=Sent
|>
|> (which is what I wanted) but now with the new quota definition style,
|> I'm not sure what I need to define the extra fields as.
|
| You'll most likely want to override quota_rule, so:
|
| alan:*:1000:1000::/home/alan::userdb_quota_rule=*:storage=2G
|
| The rest can be kept in:
|
| plugin {
|   quota = maildir
|   quota_rule = *:storage=1G
|   quota_rule2 = Trash:storage=100M
|   quota_rule3 = Sent:ignore # well, this works only with v1.1 actually
| }
|

Timo,

Cheers, that sorted me out.  Now I have a different problem I've been
trying to workout with quota_warning.

it appears that dovecot is reading the quota_warning settings properly
and calculating the threshold properly[1] but for some reason it doesn't
appear to be executing the command I've set.  I'm trying to run a perl
script.  looking at the quota_warning code it doesn't appear that that
would be a problem, and if it was it should return an error, which i'm
not seeing in the logs so i'm not sure what's happening at this point.


[1] here's some log data:


deliver(testing): Jun 12 12:19:28 Info: Loading modules from directory:
/usr/local/lib/dovecot/lda
deliver(testing): Jun 12 12:19:28 Info: Module loaded:
/usr/local/lib/dovecot/lda/lib10_quota_plugin.so
deliver(testing): Jun 12 12:19:28 Info: Module loaded:
/usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so
deliver(testing): Jun 12 12:19:28 Info: auth input: testing
deliver(testing): Jun 12 12:19:28 Info: auth input: uid=502
deliver(testing): Jun 12 12:19:28 Info: auth input: gid=502
deliver(testing): Jun 12 12:19:28 Info: auth input: home=/home/testing
deliver(testing): Jun 12 12:19:28 Info: auth input:
quota_rule=*:storage=2284K
deliver(testing): Jun 12 12:19:28 Info: Quota root: name=
backend=maildir args=
deliver(testing): Jun 12 12:19:28 Info: Quota rule: root= mailbox=
bytes=2338816 messages=0
deliver(testing): Jun 12 12:19:28 Info: Quota rule: root= mailbox=Trash
bytes=104857600 messages=0
deliver(testing): Jun 12 12:19:28 Info: Quota warning: bytes=2104934
messages=0 command=/usr/local/bin/warnquota.pl 90
deliver(testing): Jun 12 12:19:28 Info: maildir: data=/home/testing/Maildir
deliver(testing): Jun 12 12:19:28 Info: maildir:
root=/home/testing/Maildir, index=/home/testing/Maildir, control=, inbox=
deliver(testing): Jun 12 12:19:28 Info:
msgid=<485095BA.30403 at rakuten-shashinkan.jp>: saved mail to INBOX


if the account is actually over quota, deliver properly rejects the mail
with Rejected: Quota exceeded.

any ideas where to look?  Also, it's not really clear what the command
passed to quota_warn actually needs to do.  in one post by the original
creator of the quota_warning plugin (sorry, I don't recall their name)
it looked like they just piped the output of an echo command to deliver
- -c /path/to/alternate/dovecot/conf/without/quota_warning/settings .

I've tried, that.. I've tried just having it write data to a file in
/tmp .. neither of these techniques generate any results so I can only
assume that it's not being executed.

Thanks in advance.

Alan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhQtdMACgkQE2gsBSKjZHRanACfa48CraKzqeTwJsK6BL/+awaT
BDMAn2QumM4R1bYksdbn+88Sw7eMPXW5
=W42g
-----END PGP SIGNATURE-----


More information about the dovecot mailing list