[Dovecot] Quota warning patch and config parsing in 1.0.2
Dovecot 1.0.2 patches and compiles fine with the quota warning patch (http://www.dovecot.org/patches/quota-warning.patch). But, when parsing the configuration file , deliver now seems to strip all of the spaces in the QUOTA_WARNING environment variable, generating an error.
This is the plugin{} section from my dovecot.conf:
plugin { quota = maildir:storage=20480 quota_warning = storage=10% /usr/local/bin/quota-warning }
And this is the error Dovecot generates for anyone with a quota:
quota warning: No command specified: storage=10/usr/local/bin/quota-warning
Doing a diff on src/deliver/deliver.c between 1.0.1 and 1.0.2 show some changes to how the config file is parsed, but nothing I can find that would cause the spaces to get stripped out of the configuration value.
Has anyone successfully used the quota warning patch with 1.0.2?
Thanks, -Doug
Op dinsdag 17 juli 2007 schreef Doug Council:
plugin { quota = maildir:storage=20480 quota_warning = storage=10% /usr/local/bin/quota-warning }
And this is the error Dovecot generates for anyone with a quota:
quota warning: No command specified: storage=10/usr/local/bin/quota-warning
You probably have to escape that % sign with another %.
Onno
On Tue, 2007-07-17 at 22:59 +0200, Onno Molenkamp wrote:
Op dinsdag 17 juli 2007 schreef Doug Council:
plugin { quota = maildir:storage=20480 quota_warning = storage=10% /usr/local/bin/quota-warning }
And this is the error Dovecot generates for anyone with a quota:
quota warning: No command specified: storage=10/usr/local/bin/quota-warning
You probably have to escape that % sign with another %.
Oh, good point. I'll have to update v1.1's examples. But does the unescaped 10% work with IMAP then? That's weird if it does..
- Timo Sirainen <tss@iki.fi>:
You probably have to escape that % sign with another %.
Oh, good point. I'll have to update v1.1's examples. But does the unescaped 10% work with IMAP then? That's weird if it does..
It works with 1.0.2 like that:
quota_warning = storage=10%% /usr/local/scripts/quota-warning 90
But my question is: Are multiple quota_warnings possible? How?
-- Ralf Hildebrandt (Ralf.Hildebrandt@charite.de) plonk@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de A Microsoft Certified Systems Engineer is to computing what a McDonalds Certified Food Specialist is to fine cuisine
On 19.7.2007, at 23.18, Ralf Hildebrandt wrote:
- Timo Sirainen <tss@iki.fi>:
You probably have to escape that % sign with another %.
Oh, good point. I'll have to update v1.1's examples. But does the unescaped 10% work with IMAP then? That's weird if it does..
It works with 1.0.2 like that:
quota_warning = storage=10%% /usr/local/scripts/quota-warning 90
But my question is: Are multiple quota_warnings possible? How?
quota_warning2 = .. quota_warning3 = ..
With the patch if your quota jumps between multiple warnings it'll
execute each of the commands. With my v1.1 implementation it executes
only the first one.
- Timo Sirainen <tss@iki.fi>:
quota_warning = storage=10%% /usr/local/scripts/quota-warning 90
But my question is: Are multiple quota_warnings possible? How?
quota_warning2 = .. quota_warning3 = ..
Works like a charm now.
With the patch if your quota jumps between multiple warnings it'll execute each of the commands. With my v1.1 implementation it executes only the first one.
I can live with that.
-- Ralf Hildebrandt (Ralf.Hildebrandt@charite.de) plonk@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de I have a spelling checker - It came with my PC; It plainly marks four my revue - Mistakes I cannot sea. I've run this poem threw it, I'm sure your pleased too no, Its letter perfect in it's weigh, My checker tolled me sew. -- Janet Minor
participants (4)
-
Doug Council
-
Onno Molenkamp
-
Ralf Hildebrandt
-
Timo Sirainen