On 3/1/07, Timo Sirainen <tss@iki.fi> wrote:
On Thu, 2007-03-01 at 20:29 +0800, Abu Gid wrote:
>
>         You'll have to make your userdb return
>         "quota=dirsize:storage=123456"
>         setting for different users. What userdb do you use? http://
>         wiki.dovecot.org/Quota shows some examples for SQL/LDAP.
>
>
> The problem is I don't use any userdb, only use the passdb_pam.

You do use a userdb. Most likely passwd. Otherwise you couldn't log in
at all.

> So, do I have to use userdb to authenticate users? or can I just use
> any userdb for the quota part only. If that is so how can I set up the
> db config? search the wiki.dovecot.org/Quota but could not find any
> config that suit my current config ,that's why I plan to use the dict
> server. Thanks again.

You'll still have the exact same problem with dict, since you'd still
have to set the quota from the userdb.

There's an alternative way you could do with
http://wiki.dovecot.org/PostLoginScripting, for example (just the
simplest script I could think of):

#!/bin/sh

quota=/etc/dovecot-quota/$USER
if [ -f $quota ]; then
  export QUOTA=dirsize:storage=`cat $quota`
fi

exec /usr/local/libexec/dovecot/imap

Have done that .  What should I put in the plugin {}.
Should it be :
quota = dirsize:storage=10240 or 
quota = $QUOTA
Sorry, I'm a bit of newbie at this.
 -- azhar --