[Dovecot] Conflict -> Dovecot + Maildrop (maildirsize)

Timo Sirainen tss at iki.fi
Mon May 21 23:42:11 EEST 2007


On Mon, 2007-05-21 at 13:58 -0600, Kenny Dail wrote:
> > As I said in my original mail, this is simply a configuration issue:
> > 
> > Looks like you're trying to tell the quota in bytes to Dovecot. Dovecot
> > wants it to be in kilobytes in its configuration file / userdb (it still
> > writes it in bytes to maildirsize, as you can see above it writes 1GB *
> > 1024 value in there).
> > 
> > Where do you get the quota value for Dovecot? Divide it by 1024 and
> > it'll work right.
> I also use maildrop + dovecot. My quotas are stored in a mysql DB in
> couriers expected format: 50000000S (note the S on the end for storage).
> It makes for a very ugly userdb query trying to get that formatted to
> dovecot style of "maildir:storage=48828:ignore=Trash"
> 
> How much would it take to allow dovecot's quota plugin to alternately
> accept "maildir:50000000S:ignore=Trash"? 

If you don't need deliver you could use
http://wiki.dovecot.org/PostLoginScripting

v1.1 makes this a bit easier. There you'll need to use:

  #quota = maildir
  #   quota_rule = *:storage=1048576
  #   quota_rule2 = Trash:storage=102400
  # User has now 1GB quota, but when saving to Trash mailbox the user
gets
  # additional 100MB.

So only the quota_rule needs to be retrieved from userdb.

I've been thinking about changing the storage-format also so that it
could support bytes as well. Suggestions welcome how this could be best
achieved. Maybe so that after the numbers there could be
(case-insensitive) "k" / "kb" for kilobytes, "m" / "mb" for megabytes,
"g" / "gb" for gigabytes, "b" / "s" for bytes. The default would still
stay as kilobytes though.

Also the LDAP queries need to be made more flexible so it would be
possible to do something like:

user_attrs {
  homeDirectory = home
  uidNumber = uid
  gidNumber = gid
  quotaBytes = quota_rule=*:storage=%$b
  maildir = mail=Maildir:%$:INDEX=/var/index/%u
}

So %$ would expand to the field that was retrieved from LDAP and other %
vars could be used too. %$ is a bit ugly though, but I'm not sure what
would be better that isn't already in use (and won't be in future). %1
would be nice, but numbers are already used for other purposes.

-------------- 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/20070521/fbbabe70/attachment.bin 


More information about the dovecot mailing list