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

Attachment: imap-quota.diff
Description: Binary data

Attachment: quota.c
Description: Binary data

Attachment: quota.h
Description: Binary data

Reply via email to