[imp] Fwd: [PHP-DEV] IMAP quota functionality

Michael Cochrane mike@graftonhall.co.nz
Tue, 23 Jul 2002 15:14:15 +0100


This message is in MIME format.

---------------------- multipart/mixed attachment
Quoting tomc@teamics.com:

> 
> I took a different approach entirely.  Because we have 15000 users, the
> prospect of near real time quota reporting seemed risky from a performance
> standpoint.  We also have separate http and imap servers, so the latency
> associated with retrieving quota information in real time could be
> problematic.
> 
> What I decided to do was generate a quota report every 15 minutes to a flat
> file.  Then use an awk command to retrieve the user's quota info from the
> file.
> 

Not a bad idea... in that case you your IMP_Quota driver would look something
like the one attached (untested as i'm on win32)... assuming you using IMP HEAD
CVS.... and then you are back with a working quota system. just put 'awk' as
your quota driver and an empty params array....

- Mike :-)

-- 
Love is blind, but marriage restores its sight.
signature from Siglets.com

-------------------------------------------------------------------------
This mail sent from Mike's CVS HEAD install of IMP: http://horde.org/imp/
---------------------- multipart/mixed attachment
PD9waHANCi8vICRIb3JkZTogJA0KDQovKioNCiAqIEltcGxlbWVudGF0aW9uIG9mIHRoZSBRdW90
YSBBUEkgZm9yIGZldGNoaW5nIHF1b3RhIGZyb20gYSBmbGF0IGZpbGUNCiAqDQogKiBAYXV0aG9y
ICBNaWtlIENvY2hyYW5lIDxtaWtlQGdyYWZ0b25oYWxsLmNvLm56Pg0KICogQHZlcnNpb24gJFJl
dmlzaW9uOiAxLjEgJA0KICogQHNpbmNlICAgSU1QIDQuMA0KICogQHBhY2thZ2UgaW1wDQogKi8N
CmNsYXNzIElNUF9RdW90YV9hd2sgZXh0ZW5kcyBJTVBfUXVvdGEgew0KICAgIA0KICAgIC8qKg0K
ICAgICAqIEhhc2ggY29udGFpbmluZyBjb25uZWN0aW9uIHBhcmFtZXRlcnMuDQogICAgICoNCiAg
ICAgKiBAdmFyIGFycmF5ICRwYXJhbXMNCiAgICAgKi8NCiAgICB2YXIgJHBhcmFtcyA9IGFycmF5
KCk7DQoNCg0KICAgIC8qKg0KICAgICAqIENvbnN0cnVjdG9yIA0KICAgIC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F8oIlVuYWJsZSB0byByZXRyaWV2ZSBxdW90YSIpKTsNCiAgICB9DQoNCn0NCg==

---------------------- multipart/mixed attachment--