[Dovecot] Multiple quota roots
IMAP RFC defines a way to have multiple quota roots. For example with filesystem quota the first quota root would be "available disk space in filesystem" and second quota root would be the user's normal quota.
I guess this could similarly be useful for example to have a per-domain quota (eg. 10GB) and each user have their own separate quota (eg. 1GB), so that 20 the users together still couldn't use more than the 10GB.
Anyway the most important reason why I need to implement them now is to allow a configuration where you could have eg. 1GB quota normally, but also extra 100MB allowed for Trash mailbox. So even when you're over quota your IMAP client can still do its copy-to-Trash operations.
I guess with Maildir++ quota backend this should need to be implemented in a backwards compatible way so that the main maildirsize file contains the 1GB quota limit but still tracks the entire usage so it can grow to 1,1GB there.
Now, anyone have suggestions how all of this should be configured in config file to make it as useful for different purposes as possible? :)
On Mon, 2006-06-12 at 17:58 +0300, Timo Sirainen wrote:
Now, anyone have suggestions how all of this should be configured in config file to make it as useful for different purposes as possible? :)
I think like this:
quota = maildir:user storage=1000:messages=10000 (Trash storage=100)
maildir:domain path=/home/%d/domain-maildirsize:storage=10000
df:diskspace
Which creates 3 quota roots:
- Maildir++ quota named "user" with 1000kB and 10000 message count limit
- For Trash mailbox additional 100kB is allowed to be saved
- Maildir++ quota named "domain" with 10MB quota, shared between all people within domain. So if the domain quota fills up, no-one can save mails even if their user quota wouldn't be filled up.
- "diskspace" named quota root which would show how much of the filesystem is in use.
participants (1)
-
Timo Sirainen