Re: [Dovecot] Per-user quota (with local users)

2007-10-20 Thread Timo Sirainen
On Wed, 2007-10-17 at 19:57 -0400, Maykel Moya wrote:
   userdb passwd {
   }
..
 My quota configuration is
 --
 plugin {
   quota = maildir:storage=10240:ignore=Trash
 }
 --
 
 I have some users with particular quotas. With LDAP lookups, there is no
 problem, in those cases I simply put their particular quota values in
 their entries and pass it to dovecot via user_attrs.
 
 I wonder how to do the same for local users, I mean, to have the ability
 of specifying particular quotas for some local users.

passwd can't contain any extra fields, so this isn't possible with it.
You could instead use for example a checkpassword script that takes the
quota from some configuration file
(http://wiki.dovecot.org/PasswordDatabase/CheckPassword). Or you could
create a script that generates a passwd-file using /etc/passwd and a
separate quota config file and run it when something changes.

 Another doubt is how to express to Dovecot that a user have no quota at
 all, could I use 0?

Yes.



signature.asc
Description: This is a digitally signed message part


[Dovecot] Per-user quota (with local users)

2007-10-17 Thread Maykel Moya
I'm migrating to LDAP mi local users, there is the auth section of my
dovecot.conf

--
auth default {
  mechanisms = plain

  socket listen {
master {
  path = /var/run/dovecot/auth-master
  mode = 0660
  user = dovecot
  group = nusers
}
  }

  passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
  }
  
  passdb pam {
  }
  
  userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
  }
  
  userdb prefetch {
  }
  
  userdb passwd {
  }
  
  user = root
}
--

The idea is to try to find the user in the directory and if it isn't
found then fallback to a local user lookup.

My quota configuration is
--
plugin {
  quota = maildir:storage=10240:ignore=Trash
}
--

I have some users with particular quotas. With LDAP lookups, there is no
problem, in those cases I simply put their particular quota values in
their entries and pass it to dovecot via user_attrs.

I wonder how to do the same for local users, I mean, to have the ability
of specifying particular quotas for some local users.

Another doubt is how to express to Dovecot that a user have no quota at
all, could I use 0?

Regards,
maykel