[Dovecot] Quota plugin rewrite

OpenMacNews openmacnews at gmail.com
Fri Sep 22 17:29:37 EEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- -- On September 22, 2006 5:08:34 PM +0300  Timo Sirainen <tss at iki.fi> 
wrote:


> On Fri, 2006-09-22 at 06:52 -0700, OpenMacNews wrote:
>> hi,
>>
>> -- On September 14, 2006 3:31:54 PM +0300  Timo Sirainen
>> <tss at iki.fi>  wrote:
>> > In userdb if users have different quotas you'd then
>> > need to override only quota_rule (not quota, quota_rule2 and
>> > quota_rule3).
>>
>> could you please provide a specific example of the format for
>> per-user  quota override in a static userdb? (the wiki has example
>> just for sql  query ...)
>
> Umm.. With static userdb all the users have the exact same settings.
> Where could it even get the per-user quota then? Sounds like you'd
> want to user passwd-file as the userdb, or maybe checkpassword as
> passdb +userdb, or anything but static userdb..

this approach is what has been repeatedly suggested to me, given my use 
ONLY of virtual users (hence, the static userdb)

also,

@ <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.

atm, in my 'dovecot.conf':

 ...
 protocol lda {
  ...
  mail_plugins = quota cmusieve
  mail_plugin_dir = /usr/local/dovecot-plugins/lda
  plugin {
   quota = maildir:storage=10240 # 10 MB quota limit
  }
 }
 ...
 auth default {
 ...
  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

are you, instead, instructing that i need to replace:

  userdb static {
   args = static uid=301 gid=301 home=/var/Mail/Domains/%d/Accounts/%n 
nice=10
  }

with:

  userdb passwd-file {
   args = /var/Mail/USERS/imap_user_file
  }

?

and redundantly state the identical uid/gid/home for each entry in the 
userdb passwd-file, in order to get per-user quota overrides?

thanks,

richard

- -- 

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iEYEARECAAYFAkUT81UACgkQlffdvTZxCMa4zQCgskVsew4WqIvmvr9vDJORUzLP
iUEAoLuVbpVYtSHMsXTTHb2hl4zeKjc/
=RPVK
-----END PGP SIGNATURE-----



More information about the dovecot mailing list