[Dovecot] dovecot-lda setting quota rules
Hi,
in my setup dovecot-lda reads user and home from environment, and dosn't perform userdb lookup
Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Effective uid=300, gid=300, home=/vmail/la/lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota root: name=User quota backend=maildir args= Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota warning: bytes=0 (80%) messages=0 reverse=no command=quota-warning 80 lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes l ocation=maildir:~/Maildir:INDEX=/var/dovecot_indexes/vmail/la/lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: maildir++: root=/vmail/la/lazytest_test/Maildir, index=/var/dovecot_indexes/vmail/la/lazytest_tes t, control=, inbox=/vmail/la/lazytest_test/Maildir, alt= Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: userdb lookup skipped, username taken from USER environment Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota root: name=User quota backend=maildir args=
I wan't it to stay that way. The problem is that it dosn't update the quota rules in Maildir when quota is changed in userdb. I have the rules avaiable in qmail-lda's environment, but I need an idea on how to feed the quota rule string to quota plugin without doing userdb lookup.
What whould be the best way to do this, maybe in plugins/quota/quota.c:quota_root_add_rules() ?
Regards, Michal Grzedzicki
On 18.7.2012, at 4.33, Lazy wrote:
I wan't it to stay that way. The problem is that it dosn't update the quota rules in Maildir when quota is changed in userdb. I have the rules avaiable in qmail-lda's environment, but I need an idea on how to feed the quota rule string to quota plugin without doing userdb lookup.
What whould be the best way to do this, maybe in plugins/quota/quota.c:quota_root_add_rules() ?
dovecot-lda -o plugin/quota_rule=*:storage=1G
2012/7/31 Timo Sirainen tss@iki.fi:
On 18.7.2012, at 4.33, Lazy wrote:
I wan't it to stay that way. The problem is that it dosn't update the quota rules in Maildir when quota is changed in userdb. I have the rules avaiable in qmail-lda's environment, but I need an idea on how to feed the quota rule string to quota plugin without doing userdb lookup.
What whould be the best way to do this, maybe in plugins/quota/quota.c:quota_root_add_rules() ?
dovecot-lda -o plugin/quota_rule=*:storage=1G
thank You !
This is simple and elegant.
Sill I need this to be taken from environment, I produced a simple patch adding one '-o' from an environment variable.
If You consider this useful I can try and make it more generic, enable multiple option overriding.
Regards, Michal Grzedzicki
On 3.8.2012, at 2.13, Lazy wrote:
dovecot-lda -o plugin/quota_rule=*:storage=1G
thank You !
This is simple and elegant.
Sill I need this to be taken from environment, I produced a simple patch adding one '-o' from an environment variable.
You can also set environment:
PLUGIN/QUOTA_RULE=*:storage=1G
and then use dovecot-lda -k parameter.
And if even that doesn't work, you could simply create a wrapper script.
If You consider this useful I can try and make it more generic, enable multiple option overriding.
You can also give -o parameter multiple times.
it works great. thank You again
Regards, Michal Grzedzicki
2012/8/3, Timo Sirainen tss@iki.fi:
On 3.8.2012, at 2.13, Lazy wrote:
dovecot-lda -o plugin/quota_rule=*:storage=1G
thank You !
This is simple and elegant.
Sill I need this to be taken from environment, I produced a simple patch adding one '-o' from an environment variable.
You can also set environment:
PLUGIN/QUOTA_RULE=*:storage=1G
and then use dovecot-lda -k parameter.
And if even that doesn't work, you could simply create a wrapper script.
If You consider this useful I can try and make it more generic, enable multiple option overriding.
You can also give -o parameter multiple times.
participants (2)
-
Lazy
-
Timo Sirainen