[Dovecot] Quota plugin rewrite

Timo Sirainen tss at iki.fi
Fri Sep 22 18:19:23 EEST 2006


On Fri, 2006-09-22 at 07:29 -0700, OpenMacNews wrote:
> @ <http://wiki.dovecot.org/Quota>
> "The above example shows how to set the same quota globally for 
> everyone. You can override this for one or all users by returning a 
> quota field from the user database. See UserDatabase for more 
> information about how to set them for the user database you are using. "
> 
> and, @ <http://wiki.dovecot.org/UserDatabase>
> "Currently supported user databases are: ..."
> 
> implies, to my read, that _all_ userdb types are 'supported' for quota 
> overrides.

Sure, you can override the quota in also static userdb, as long as you
can figure out a way to do that with the possible %variables. For
example you could set quota=%p which would override the quota and set it
to same as the current process ID. Not very useful though ;)

>   passdb passwd-file {
>    args = /var/Mail/USERS/imap_user_file
>   }
>   userdb static {
>    args = static uid=301 gid=301 home=/var/Mail/Domains/%d/Accounts/%n 
> nice=10
>   }
>  }
> 
> and, in '/var/Mail/USERS/imap_user_file':
> 
> 	testuser1 at mydomain.com:{PLAIN}testpass1::::::quota=maildir:storage=4096
> 	testuser2 at mydomain.com:{PLAIN}testpass2::::::quota=maildir:storage=2048

Ah, since you're using passwd-file as the passdb, it should be possible
to do it this way. Just change quota to userdb_quota.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060922/7ac3d96b/attachment.pgp 


More information about the dovecot mailing list