Hello, I've written some simple support for the IMAP QUOTA extension (RFC 2087) for dbmail-imapd. I've attached the files quota.c, quota.h (to be placed in dbmail's source directory), and a patch against current CVS to integrate the quota support.
quota.h defines three types: 'resource_type_t' denoting the type of a limited resource (only STORAGE is supported), 'resource_limit_t' describing the limit and current usage of a resource, and quota_t holding the limits and current usages for all resources of a quota root. quota.c implements functions for manipulating these types, and for getting the storage limit and current usage from the database. The patch adds support for the IMAP GETQUOTAROOT and GETQUOTA commands using functions from quota.c. I haven't tested the code very much, but it worked in my tests :-) Maybe this can be a starting point for quota support in DBMail. I'm looking forward to receiving your comments. Regards, Armin
imap-quota.diff
Description: Binary data
quota.c
Description: Binary data
quota.h
Description: Binary data